Vim 7.2b ready for testing.
[MacVim.git] / src / INSTALLx.txt
blob0ba6a776e0844a414a28c8896faff2286be51035
1 Content:
2  1. Introduction
3  2. Necessary arguments for "configure"
4  3. Necessary environment variables for "configure"
5  4. Example
8 1. INTRODUCTION
9 ===============
11 This document discusses cross-compiling VIM on Unix-like systems. We assume
12 you are already familiar with cross-compiling and have a working cross-compile
13 environment with at least the following components:
15  * a cross-compiler
16  * a libc to link against
17  * ncurses library to link against
19 Discussing how to set up a cross-compile environment would go beyond the scope
20 of this document. See http://www.kegel.com/crosstool/ for more information and
21 a script that aids in setting up such an environment.
24 The problem is that "configure" needs to compile and run small test programs
25 to check for certain features. Running these test programs can't be done when
26 cross-compiling so we need to pass the results these checks would produce via
27 environment variables. See the list of variables and the examples at the end of
28 this document.
31 2. NECESSARY ARGUMENTS FOR "configure"
32 ======================================
34 You need to set the following "configure" command line switches:
36 --build=... :
37         The build system (i.e. the platform name of the system you compile on
38         right now).
39         For example, "i586-linux".
41 --host=... :
42         The system on which VIM will be run. Quite often this the name of your
43         cross-compiler without the "-gcc".
44         For example, "powerpc-603-linux-gnu".
46 --target=... :
47         Only relevant for compiling compilers. Set this to the same value as
48         --host.
50 --with-tlib=... :
51         Which terminal library to.
52         For example, "ncurses".
55 3. NECESSARY ENVIRONMENT VARIABLES FOR "configure"
56 ==================================================
58 Additionally to the variables listed here you might want to set the CPPFLAGS
59 environment variable to enable optimization for your target system (e.g.
60 "CPPFLAGS=-march=arm5te").
62 The following variables need to be set:
64 ac_cv_sizeof_int:
65         The size of an "int" C type in bytes. Should be "4" on all 32bit
66         machines.
68 vi_cv_path_python_conf:
69         If Python support is enabled, set this variables to the path for
70         Python's library implementation. This is a path like
71         "/usr/lib/pythonX.Y/config" (the directory contains a file
72         "config.c").
74 vi_cv_var_python_epfx:
75         If Python support is enabled, set this variables to the execution
76         prefix of your Python interpreter (that is, where it thinks it is
77         running).
78         This is the output of the following Python script:
79                 import sys; print sys.exec_prefix
81 vi_cv_var_python_pfx:
82         If Python support is enabled, set this variables to the prefix of your
83         Python interpreter (that is, where was installed).
84         This is the output of the following Python script:
85                 import sys; print sys.prefix
87 vi_cv_var_python_version:
88         If Python support is enabled, set this variables to the version of the
89         Python interpreter that will be used.
90         This is the output of the following Python script:
91                 import sys; print sys.version[:3]
93 vim_cv_bcopy_handles_overlap:
94         Whether the "memmove" C library call is able to copy overlapping
95         memory regions. Set to "yes" if it does or "no" if it does not.
96         You only need to set this if vim_cv_memmove_handles_overlap is set
97         to "no".
99 vim_cv_getcwd_broken:
100         Whether the "getcwd" C library call is broken. Set to "yes" if you
101         know that "getcwd" is implemented as 'system("sh -c pwd")', set to
102         "no" otherwise.
104 vim_cv_memcpy_handles_overlap:
105         Whether the "memcpy" C library call is able to copy overlapping
106         memory regions. Set to "yes" if it does or "no" if it does not.
107         You only need to set this if both vim_cv_memmove_handles_overlap
108         and vim_cv_bcopy_handles_overlap are set to "no".
110 vim_cv_memmove_handles_overlap:
111         Whether the "memmove" C library call is able to copy overlapping
112         memory regions. Set to "yes" if it does or "no" if it does not.
114 vim_cv_stat_ignores_slash:
115         Whether the "stat" C library call ignores trailing slashes in the path
116         name. Set to "yes" if it ignores them or "no" if it does not ignore
117         them.
119 vim_cv_tgetent:
120         Whether the "tgetent" terminal library call returns a zero or non-zero
121         value when it encounters an unknown terminal. Set to either the string
122         "zero" or "non-zero", corresponding.
124 vim_cv_terminfo:
125         Whether the environment has terminfo support. Set to "yes" if so,
126         otherwise set to "no".
128 vim_cv_toupper_broken:
129         Whether the "toupper" C library function works correctly. Set to "yes"
130         if you know it's broken, otherwise set to "no".
132 vim_cv_tty_group:
133         The default group of pseudo terminals. Either set to the numeric value
134         of the your tty group or to "world" if they are world accessable.
136 vim_cv_tty_mode:
137         The default mode of pseudo terminals if they are not world accessable.
138         Most propably the value "0620".
141 4. EXAMPLE:
142 ===========
144 Assuming the target system string is "armeb-xscale-linux-gnu" (a Intel XScale
145 system) with glibc and ncurses, the call to configure would look like this:
147 ac_cv_sizeof_int=4 \
148 vim_cv_getcwd_broken=no \
149 vim_cv_memmove_handles_overlap=yes \
150 vim_cv_stat_ignores_slash=yes \
151 vim_cv_tgetent=zero \
152 vim_cv_terminfo=yes \
153 vim_cv_toupper_broken=no \
154 vim_cv_tty_group=world \
155 ./configure \
156         --build=i586-linux \
157         --host=armeb-xscale-linux-gnu \
158         --target=armeb-xscale-linux-gnu \
159         --with-tlib=ncurses
163 Written 2007 by Marc Haisenko <marc@darkdust.net> for the VIM project.