1 | @c This file is included by autoconf.texi and is used to produce |
---|
2 | @c the INSTALL file. |
---|
3 | |
---|
4 | @node Basic Installation |
---|
5 | @section Basic Installation |
---|
6 | |
---|
7 | These are generic installation instructions. |
---|
8 | |
---|
9 | The @code{configure} shell script attempts to guess correct values for |
---|
10 | various system-dependent variables used during compilation. It uses |
---|
11 | those values to create a @file{Makefile} in each directory of the |
---|
12 | package. It may also create one or more @file{.h} files containing |
---|
13 | system-dependent definitions. Finally, it creates a shell script |
---|
14 | @file{config.status} that you can run in the future to recreate the |
---|
15 | current configuration, a file @file{config.cache} that saves the results |
---|
16 | of its tests to speed up reconfiguring, and a file @file{config.log} |
---|
17 | containing compiler output (useful mainly for debugging |
---|
18 | @code{configure}). |
---|
19 | |
---|
20 | If you need to do unusual things to compile the package, please try to |
---|
21 | figure out how @code{configure} could check whether to do them, and mail |
---|
22 | diffs or instructions to the address given in the @file{README} so they |
---|
23 | can be considered for the next release. If at some point |
---|
24 | @file{config.cache} contains results you don't want to keep, you may |
---|
25 | remove or edit it. |
---|
26 | |
---|
27 | The file @file{configure.in} is used to create @file{configure} by a |
---|
28 | program called @code{autoconf}. You only need @file{configure.in} if |
---|
29 | you want to change it or regenerate @file{configure} using a newer |
---|
30 | version of @code{autoconf}. |
---|
31 | |
---|
32 | @noindent |
---|
33 | The simplest way to compile this package is: |
---|
34 | |
---|
35 | @enumerate |
---|
36 | @item |
---|
37 | @code{cd} to the directory containing the package's source code and type |
---|
38 | @samp{./configure} to configure the package for your system. If you're |
---|
39 | using @code{csh} on an old version of System V, you might need to type |
---|
40 | @samp{sh ./configure} instead to prevent @code{csh} from trying to |
---|
41 | execute @code{configure} itself. |
---|
42 | |
---|
43 | Running @code{configure} takes awhile. While running, it prints some |
---|
44 | messages telling which features it is checking for. |
---|
45 | |
---|
46 | @item |
---|
47 | Type @samp{make} to compile the package. |
---|
48 | |
---|
49 | @item |
---|
50 | Optionally, type @samp{make check} to run any self-tests that come with |
---|
51 | the package. |
---|
52 | |
---|
53 | @item |
---|
54 | Type @samp{make install} to install the programs and any data files and |
---|
55 | documentation. |
---|
56 | |
---|
57 | @item |
---|
58 | You can remove the program binaries and object files from the source code |
---|
59 | directory by typing @samp{make clean}. To also remove the files that |
---|
60 | @code{configure} created (so you can compile the package for a different |
---|
61 | kind of computer), type @samp{make distclean}. There is also a |
---|
62 | @samp{make maintainer-clean} target, but that is intended mainly for the |
---|
63 | package's developers. If you use it, you may have to get all sorts of |
---|
64 | other programs in order to regenerate files that came with the distribution. |
---|
65 | @end enumerate |
---|
66 | |
---|
67 | @node Compilers and Options |
---|
68 | @section Compilers and Options |
---|
69 | |
---|
70 | Some systems require unusual options for compilation or linking that |
---|
71 | the @code{configure} script does not know about. You can give |
---|
72 | @code{configure} initial values for variables by setting them in the |
---|
73 | environment. Using a Bourne-compatible shell, you can do that on the |
---|
74 | command line like this: |
---|
75 | @example |
---|
76 | CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure |
---|
77 | @end example |
---|
78 | |
---|
79 | @noindent |
---|
80 | Or on systems that have the @code{env} program, you can do it like this: |
---|
81 | @example |
---|
82 | env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure |
---|
83 | @end example |
---|
84 | |
---|
85 | @node Multiple Architectures |
---|
86 | @section Compiling For Multiple Architectures |
---|
87 | |
---|
88 | You can compile the package for more than one kind of computer at the |
---|
89 | same time, by placing the object files for each architecture in their |
---|
90 | own directory. To do this, you must use a version of @code{make} that |
---|
91 | supports the @code{VPATH} variable, such as GNU @code{make}. @code{cd} |
---|
92 | to the directory where you want the object files and executables to go |
---|
93 | and run the @code{configure} script. @code{configure} automatically |
---|
94 | checks for the source code in the directory that @code{configure} is in |
---|
95 | and in @file{..}. |
---|
96 | |
---|
97 | If you have to use a @code{make} that does not supports the @code{VPATH} |
---|
98 | variable, you have to compile the package for one architecture at a time |
---|
99 | in the source code directory. After you have installed the package for |
---|
100 | one architecture, use @samp{make distclean} before reconfiguring for |
---|
101 | another architecture. |
---|
102 | |
---|
103 | @node Installation Names |
---|
104 | @section Installation Names |
---|
105 | |
---|
106 | By default, @samp{make install} will install the package's files in |
---|
107 | @file{/usr/local/bin}, @file{/usr/local/man}, etc. You can specify an |
---|
108 | installation prefix other than @file{/usr/local} by giving |
---|
109 | @code{configure} the option @samp{--prefix=@var{path}}. |
---|
110 | |
---|
111 | You can specify separate installation prefixes for architecture-specific |
---|
112 | files and architecture-independent files. If you give @code{configure} |
---|
113 | the option @samp{--exec-prefix=@var{path}}, the package will use |
---|
114 | @var{path} as the prefix for installing programs and libraries. |
---|
115 | Documentation and other data files will still use the regular prefix. |
---|
116 | |
---|
117 | In addition, if you use an unusual directory layout you can give options |
---|
118 | like @samp{--bindir=@var{path}} to specify different values for |
---|
119 | particular kinds of files. Run @samp{configure --help} for a list of |
---|
120 | the directories you can set and what kinds of files go in them. |
---|
121 | |
---|
122 | If the package supports it, you can cause programs to be installed with |
---|
123 | an extra prefix or suffix on their names by giving @code{configure} the |
---|
124 | option @samp{--program-prefix=@var{PREFIX}} or |
---|
125 | @samp{--program-suffix=@var{SUFFIX}}. |
---|
126 | |
---|
127 | @node Optional Features |
---|
128 | @section Optional Features |
---|
129 | |
---|
130 | Some packages pay attention to @samp{--enable-@var{feature}} options to |
---|
131 | @code{configure}, where @var{feature} indicates an optional part of the |
---|
132 | package. They may also pay attention to @samp{--with-@var{package}} |
---|
133 | options, where @var{package} is something like @samp{gnu-as} or @samp{x} |
---|
134 | (for the X Window System). The @file{README} should mention any |
---|
135 | @samp{--enable-} and @samp{--with-} options that the package recognizes. |
---|
136 | |
---|
137 | For packages that use the X Window System, @code{configure} can usually |
---|
138 | find the X include and library files automatically, but if it doesn't, |
---|
139 | you can use the @code{configure} options @samp{--x-includes=@var{dir}} |
---|
140 | and @samp{--x-libraries=@var{dir}} to specify their locations. |
---|
141 | |
---|
142 | @node System Type |
---|
143 | @section Specifying the System Type |
---|
144 | |
---|
145 | There may be some features @code{configure} can not figure out |
---|
146 | automatically, but needs to determine by the type of host the package |
---|
147 | will run on. Usually @code{configure} can figure that out, but if it |
---|
148 | prints a message saying it can not guess the host type, give it the |
---|
149 | @samp{--host=@var{type}} option. @var{type} can either be a short name |
---|
150 | for the system type, such as @samp{sun4}, or a canonical name with three |
---|
151 | fields: |
---|
152 | @example |
---|
153 | @var{cpu}-@var{company}-@var{system} |
---|
154 | @end example |
---|
155 | @noindent |
---|
156 | See the file @file{config.sub} for the possible values of each field. |
---|
157 | If @file{config.sub} isn't included in this package, then this package |
---|
158 | doesn't need to know the host type. |
---|
159 | |
---|
160 | If you are building compiler tools for cross-compiling, you can also use |
---|
161 | the @samp{--target=@var{type}} option to select the type of system |
---|
162 | they will produce code for and the @samp{--build=@var{type}} option |
---|
163 | to select the type of system on which you are compiling the package. |
---|
164 | |
---|
165 | @node Sharing Defaults |
---|
166 | @section Sharing Defaults |
---|
167 | |
---|
168 | If you want to set default values for @code{configure} scripts to share, |
---|
169 | you can create a site shell script called @file{config.site} that gives |
---|
170 | default values for variables like @code{CC}, @code{cache_file}, and |
---|
171 | @code{prefix}. @code{configure} looks for |
---|
172 | @file{@var{prefix}/share/config.site} if it exists, then |
---|
173 | @file{@var{prefix}/etc/config.site} if it exists. Or, you can set |
---|
174 | the @code{CONFIG_SITE} environment variable to the location of the site |
---|
175 | script. A warning: not all @code{configure} scripts look for a site script. |
---|
176 | |
---|
177 | @node Operation Controls |
---|
178 | @section Operation Controls |
---|
179 | |
---|
180 | @code{configure} recognizes the following options to control how it |
---|
181 | operates. |
---|
182 | |
---|
183 | @table @code |
---|
184 | @item --cache-file=@var{file} |
---|
185 | Use and save the results of the tests in @var{file} instead of |
---|
186 | @file{./config.cache}. Set @var{file} to @file{/dev/null} to disable |
---|
187 | caching, for debugging @code{configure}. |
---|
188 | |
---|
189 | @item --help |
---|
190 | Print a summary of the options to @code{configure}, and exit. |
---|
191 | |
---|
192 | @item --quiet |
---|
193 | @itemx --silent |
---|
194 | @itemx -q |
---|
195 | Do not print messages saying which checks are being made. |
---|
196 | To suppress all normal output, redirect it to @file{/dev/null} |
---|
197 | (any error messages will still be shown). |
---|
198 | |
---|
199 | @item --srcdir=@var{dir} |
---|
200 | Look for the package's source code in directory @var{dir}. Usually |
---|
201 | @code{configure} can determine that directory automatically. |
---|
202 | |
---|
203 | @item --version |
---|
204 | Print the version of Autoconf used to generate the @code{configure} |
---|
205 | script, and exit. |
---|
206 | @end table |
---|
207 | |
---|
208 | @noindent |
---|
209 | @code{configure} also accepts some other, not widely useful, options. |
---|