1 | Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation, |
1 | Installation Instructions |
2 | Inc. |
2 | ************************* |
3 | |
3 | |
|
|
4 | Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free |
|
|
5 | Software Foundation, Inc. |
|
|
6 | |
4 | This file is free documentation; the Free Software Foundation gives |
7 | This file is free documentation; the Free Software Foundation gives |
5 | unlimited permission to copy, distribute and modify it. |
8 | unlimited permission to copy, distribute and modify it. |
6 | |
9 | |
7 | Basic Installation |
10 | Basic Installation |
8 | ================== |
11 | ================== |
9 | |
12 | |
10 | These are generic installation instructions. |
13 | These are generic installation instructions. |
11 | |
14 | |
12 | The `configure' shell script attempts to guess correct values for |
15 | The `configure' shell script attempts to guess correct values for |
13 | various system-dependent variables used during compilation. It uses |
16 | various system-dependent variables used during compilation. It uses |
14 | those values to create a `Makefile' in each directory of the package. |
17 | those values to create a `Makefile' in each directory of the package. |
15 | It may also create one or more `.h' files containing system-dependent |
18 | It may also create one or more `.h' files containing system-dependent |
… | |
… | |
65 | with the distribution. |
68 | with the distribution. |
66 | |
69 | |
67 | Compilers and Options |
70 | Compilers and Options |
68 | ===================== |
71 | ===================== |
69 | |
72 | |
70 | Some systems require unusual options for compilation or linking that |
73 | Some systems require unusual options for compilation or linking that the |
71 | the `configure' script does not know about. Run `./configure --help' |
74 | `configure' script does not know about. Run `./configure --help' for |
72 | for details on some of the pertinent environment variables. |
75 | details on some of the pertinent environment variables. |
73 | |
76 | |
74 | You can give `configure' initial values for variables by setting |
77 | You can give `configure' initial values for configuration parameters |
75 | them in the environment. You can do that on the command line like this: |
78 | by setting variables in the command line or in the environment. Here |
|
|
79 | is an example: |
76 | |
80 | |
77 | ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix |
81 | ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix |
78 | |
82 | |
79 | *Note Defining Variables::, for more details. |
83 | *Note Defining Variables::, for more details. |
80 | |
84 | |
81 | Compiling For Multiple Architectures |
85 | Compiling For Multiple Architectures |
82 | ==================================== |
86 | ==================================== |
83 | |
87 | |
84 | You can compile the package for more than one kind of computer at the |
88 | You can compile the package for more than one kind of computer at the |
85 | same time, by placing the object files for each architecture in their |
89 | same time, by placing the object files for each architecture in their |
86 | own directory. To do this, you must use a version of `make' that |
90 | own directory. To do this, you must use a version of `make' that |
87 | supports the `VPATH' variable, such as GNU `make'. `cd' to the |
91 | supports the `VPATH' variable, such as GNU `make'. `cd' to the |
88 | directory where you want the object files and executables to go and run |
92 | directory where you want the object files and executables to go and run |
89 | the `configure' script. `configure' automatically checks for the |
93 | the `configure' script. `configure' automatically checks for the |
… | |
… | |
96 | for another architecture. |
100 | for another architecture. |
97 | |
101 | |
98 | Installation Names |
102 | Installation Names |
99 | ================== |
103 | ================== |
100 | |
104 | |
101 | By default, `make install' will install the package's files in |
105 | By default, `make install' will install the package's files in |
102 | `/usr/local/bin', `/usr/local/man', etc. You can specify an |
106 | `/usr/local/bin', `/usr/local/man', etc. You can specify an |
103 | installation prefix other than `/usr/local' by giving `configure' the |
107 | installation prefix other than `/usr/local' by giving `configure' the |
104 | option `--prefix=PATH'. |
108 | option `--prefix=PREFIX'. |
105 | |
109 | |
106 | You can specify separate installation prefixes for |
110 | You can specify separate installation prefixes for |
107 | architecture-specific files and architecture-independent files. If you |
111 | architecture-specific files and architecture-independent files. If you |
108 | give `configure' the option `--exec-prefix=PATH', the package will use |
112 | give `configure' the option `--exec-prefix=PREFIX', the package will |
109 | PATH as the prefix for installing programs and libraries. |
113 | use PREFIX as the prefix for installing programs and libraries. |
110 | Documentation and other data files will still use the regular prefix. |
114 | Documentation and other data files will still use the regular prefix. |
111 | |
115 | |
112 | In addition, if you use an unusual directory layout you can give |
116 | In addition, if you use an unusual directory layout you can give |
113 | options like `--bindir=PATH' to specify different values for particular |
117 | options like `--bindir=DIR' to specify different values for particular |
114 | kinds of files. Run `configure --help' for a list of the directories |
118 | kinds of files. Run `configure --help' for a list of the directories |
115 | you can set and what kinds of files go in them. |
119 | you can set and what kinds of files go in them. |
116 | |
120 | |
117 | If the package supports it, you can cause programs to be installed |
121 | If the package supports it, you can cause programs to be installed |
118 | with an extra prefix or suffix on their names by giving `configure' the |
122 | with an extra prefix or suffix on their names by giving `configure' the |
119 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. |
123 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. |
120 | |
124 | |
121 | Optional Features |
125 | Optional Features |
122 | ================= |
126 | ================= |
123 | |
127 | |
124 | Some packages pay attention to `--enable-FEATURE' options to |
128 | Some packages pay attention to `--enable-FEATURE' options to |
125 | `configure', where FEATURE indicates an optional part of the package. |
129 | `configure', where FEATURE indicates an optional part of the package. |
126 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE |
130 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE |
127 | is something like `gnu-as' or `x' (for the X Window System). The |
131 | is something like `gnu-as' or `x' (for the X Window System). The |
128 | `README' should mention any `--enable-' and `--with-' options that the |
132 | `README' should mention any `--enable-' and `--with-' options that the |
129 | package recognizes. |
133 | package recognizes. |
… | |
… | |
134 | `--x-libraries=DIR' to specify their locations. |
138 | `--x-libraries=DIR' to specify their locations. |
135 | |
139 | |
136 | Specifying the System Type |
140 | Specifying the System Type |
137 | ========================== |
141 | ========================== |
138 | |
142 | |
139 | There may be some features `configure' cannot figure out |
143 | There may be some features `configure' cannot figure out automatically, |
140 | automatically, but needs to determine by the type of host the package |
144 | but needs to determine by the type of machine the package will run on. |
|
|
145 | Usually, assuming the package is built to be run on the _same_ |
141 | will run on. Usually `configure' can figure that out, but if it prints |
146 | architectures, `configure' can figure that out, but if it prints a |
142 | a message saying it cannot guess the host type, give it the |
147 | message saying it cannot guess the machine type, give it the |
143 | `--build=TYPE' option. TYPE can either be a short name for the system |
148 | `--build=TYPE' option. TYPE can either be a short name for the system |
144 | type, such as `sun4', or a canonical name which has the form: |
149 | type, such as `sun4', or a canonical name which has the form: |
145 | |
150 | |
146 | CPU-COMPANY-SYSTEM |
151 | CPU-COMPANY-SYSTEM |
147 | |
152 | |
… | |
… | |
149 | |
154 | |
150 | OS KERNEL-OS |
155 | OS KERNEL-OS |
151 | |
156 | |
152 | See the file `config.sub' for the possible values of each field. If |
157 | See the file `config.sub' for the possible values of each field. If |
153 | `config.sub' isn't included in this package, then this package doesn't |
158 | `config.sub' isn't included in this package, then this package doesn't |
154 | need to know the host type. |
159 | need to know the machine type. |
155 | |
160 | |
156 | If you are _building_ compiler tools for cross-compiling, you should |
161 | If you are _building_ compiler tools for cross-compiling, you should |
157 | use the `--target=TYPE' option to select the type of system they will |
162 | use the `--target=TYPE' option to select the type of system they will |
158 | produce code for. |
163 | produce code for. |
159 | |
164 | |
160 | If you want to _use_ a cross compiler, that generates code for a |
165 | If you want to _use_ a cross compiler, that generates code for a |
161 | platform different from the build platform, you should specify the host |
166 | platform different from the build platform, you should specify the |
162 | platform (i.e., that on which the generated programs will eventually be |
167 | "host" platform (i.e., that on which the generated programs will |
163 | run) with `--host=TYPE'. In this case, you should also specify the |
168 | eventually be run) with `--host=TYPE'. |
164 | build platform with `--build=TYPE', because, in this case, it may not |
|
|
165 | be possible to guess the build platform (it sometimes involves |
|
|
166 | compiling and running simple test programs, and this can't be done if |
|
|
167 | the compiler is a cross compiler). |
|
|
168 | |
169 | |
169 | Sharing Defaults |
170 | Sharing Defaults |
170 | ================ |
171 | ================ |
171 | |
172 | |
172 | If you want to set default values for `configure' scripts to share, |
173 | If you want to set default values for `configure' scripts to share, you |
173 | you can create a site shell script called `config.site' that gives |
174 | can create a site shell script called `config.site' that gives default |
174 | default values for variables like `CC', `cache_file', and `prefix'. |
175 | values for variables like `CC', `cache_file', and `prefix'. |
175 | `configure' looks for `PREFIX/share/config.site' if it exists, then |
176 | `configure' looks for `PREFIX/share/config.site' if it exists, then |
176 | `PREFIX/etc/config.site' if it exists. Or, you can set the |
177 | `PREFIX/etc/config.site' if it exists. Or, you can set the |
177 | `CONFIG_SITE' environment variable to the location of the site script. |
178 | `CONFIG_SITE' environment variable to the location of the site script. |
178 | A warning: not all `configure' scripts look for a site script. |
179 | A warning: not all `configure' scripts look for a site script. |
179 | |
180 | |
180 | Defining Variables |
181 | Defining Variables |
181 | ================== |
182 | ================== |
182 | |
183 | |
183 | Variables not defined in a site shell script can be set in the |
184 | Variables not defined in a site shell script can be set in the |
184 | environment passed to `configure'. However, some packages may run |
185 | environment passed to `configure'. However, some packages may run |
185 | configure again during the build, and the customized values of these |
186 | configure again during the build, and the customized values of these |
186 | variables may be lost. In order to avoid this problem, you should set |
187 | variables may be lost. In order to avoid this problem, you should set |
187 | them in the `configure' command line, using `VAR=value'. For example: |
188 | them in the `configure' command line, using `VAR=value'. For example: |
188 | |
189 | |
… | |
… | |
192 | overridden in the site shell script). |
193 | overridden in the site shell script). |
193 | |
194 | |
194 | `configure' Invocation |
195 | `configure' Invocation |
195 | ====================== |
196 | ====================== |
196 | |
197 | |
197 | `configure' recognizes the following options to control how it |
198 | `configure' recognizes the following options to control how it operates. |
198 | operates. |
|
|
199 | |
199 | |
200 | `--help' |
200 | `--help' |
201 | `-h' |
201 | `-h' |
202 | Print a summary of the options to `configure', and exit. |
202 | Print a summary of the options to `configure', and exit. |
203 | |
203 | |