1 Installation Instructions
2 *************************
7 The following shell commands:
9 test -f configure || ./bootstrap
14 should configure, build, and install this package. The first line,
15 which bootstraps, is intended for developers; when building from
16 distribution tarballs it does nothing and can be skipped. A package
17 might name the bootstrapping script differently; if the name is
18 'autogen.sh', for example, the first line should say './autogen.sh'
19 instead of './bootstrap'.
21 The following more-detailed instructions are generic; see the
22 'README' file for instructions specific to this package. Some packages
23 provide this 'INSTALL' file but do not implement all of the features
24 documented below. The lack of an optional feature in a given package is
25 not necessarily a bug. More recommendations for GNU packages can be
26 found in the GNU Coding Standards.
28 Many packages have scripts meant for developers instead of ordinary
29 builders, as they may use developer tools that are less commonly
30 installed, or they may access the network, which has privacy
31 implications. These scripts attempt to bootstrap by building the
32 'configure' script and related files, possibly using developer tools or
33 the network. Because the output of bootstrapping is system-independent,
34 it is normally run by a package developer so that its output can be put
35 into the distribution tarball and ordinary builders and users need not
36 bootstrap. Some packages have commands like './autopull.sh' and
37 './autogen.sh' that you can run instead of './bootstrap', for more
38 fine-grained control over bootstrapping.
40 The 'configure' script attempts to guess correct values for various
41 system-dependent variables used during compilation. It uses those
42 values to create a 'Makefile' in each directory of the package. It may
43 also create one or more '.h' files containing system-dependent
44 definitions. Finally, it creates a script 'config.status' that you can
45 run in the future to recreate the current configuration, and a file
46 'config.log' containing output useful for debugging 'configure'.
48 It can also use an optional file (typically called 'config.cache' and
49 enabled with '--cache-file=config.cache' or simply '-C') that saves the
50 results of its tests to speed up reconfiguring. Caching is disabled by
51 default to prevent problems with accidental use of stale cache files.
53 If you need to do unusual things to compile the package, please try
54 to figure out how 'configure' could check whether to do them, and mail
55 diffs or instructions to the address given in the 'README' so they can
56 be considered for the next release. If you are using the cache, and at
57 some point 'config.cache' contains results you don't want to keep, you
58 may remove or edit it.
60 The 'autoconf' program generates 'configure' from the file
61 'configure.ac'. Normally you should edit 'configure.ac' instead of
62 editing 'configure' directly.
64 The simplest way to compile this package is:
66 1. 'cd' to the directory containing the package's source code.
68 2. If this is a developer checkout and file 'configure' does not yet
69 exist, run the bootstrapping script (typically './bootstrap' or
70 './autogen.sh') to bootstrap and create the file. You may need
71 special developer tools and network access to bootstrap, and the
72 network access may have privacy implications.
74 3. Type './configure' to configure the package for your system. This
75 might take a while. While running, 'configure' prints messages
76 telling which features it is checking for.
78 4. Type 'make' to compile the package.
80 5. Optionally, type 'make check' to run any self-tests that come with
81 the package, generally using the just-built uninstalled binaries.
83 6. Type 'make install' to install the programs and any data files and
84 documentation. When installing into a prefix owned by root, it is
85 recommended that the package be configured and built as a regular
86 user, and only the 'make install' phase executed with root
89 7. Optionally, type 'make installcheck' to repeat any self-tests, but
90 this time using the binaries in their final installed location.
91 This target does not install anything. Running this target as a
92 regular user, particularly if the prior 'make install' required
93 root privileges, verifies that the installation completed
96 8. You can remove the program binaries and object files from the
97 source code directory by typing 'make clean'. To also remove the
98 files that 'configure' created (so you can compile the package for
99 a different kind of computer), type 'make distclean'. There is
100 also a 'make maintainer-clean' target, but that is intended mainly
101 for the package's developers. If you use it, you may have to
104 9. If the package follows the GNU Coding Standards, you can type 'make
105 uninstall' to remove the installed files.
107 Compilers and Options
108 =====================
110 Some systems require unusual options for compilation or linking that
111 the 'configure' script does not know about. Run './configure --help'
112 for details on some of the pertinent environment variables.
114 You can give 'configure' initial values for configuration parameters
115 by setting variables in the command line or in the environment. Here is
118 ./configure CC=gcc CFLAGS=-g LIBS=-lposix
120 See "Defining Variables" for more details.
122 Compiling For Multiple Architectures
123 ====================================
125 You can compile the package for more than one kind of computer at the
126 same time, by placing the object files for each system in their own
127 directory. To do this, you can use GNU 'make'. 'cd' to the directory
128 where you want the object files and executables to go and run the
129 'configure' script. 'configure' automatically checks for the source
130 code in the directory that 'configure' is in and in '..'. This is known
133 With a non-GNU 'make', it is safer to compile the package for one
134 system at a time in the source code directory. After you have installed
135 the package for one system, use 'make distclean' before reconfiguring
138 Some platforms, notably macOS, support "fat" or "universal" binaries,
139 where a single binary can execute on different architectures. On these
140 platforms you can configure and compile just once, with options specific
146 By default, 'make install' installs the package's commands under
147 '/usr/local/bin', include files under '/usr/local/include', etc. You
148 can specify an installation prefix other than '/usr/local' by giving
149 'configure' the option '--prefix=PREFIX', where PREFIX must be an
152 You can specify separate installation prefixes for
153 architecture-specific files and architecture-independent files. If you
154 pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
155 PREFIX as the prefix for installing programs and libraries.
156 Documentation and other data files still use the regular prefix.
158 In addition, if you use an unusual directory layout you can give
159 options like '--bindir=DIR' to specify different values for particular
160 kinds of files. Run 'configure --help' for a list of the directories
161 you can set and what kinds of files go in them. In general, the default
162 for these options is expressed in terms of '${prefix}', so that
163 specifying just '--prefix' will affect all of the other directory
164 specifications that were not explicitly provided.
166 The most portable way to affect installation locations is to pass the
167 correct locations to 'configure'; however, many packages provide one or
168 both of the following shortcuts of passing variable assignments to the
169 'make install' command line to change installation locations without
170 having to reconfigure or recompile.
172 The first method involves providing an override variable for each
173 affected directory. For example, 'make install
174 prefix=/alternate/directory' will choose an alternate location for all
175 directory configuration variables that were expressed in terms of
176 '${prefix}'. Any directories that were specified during 'configure',
177 but not in terms of '${prefix}', must each be overridden at install time
178 for the entire installation to be relocated. The approach of makefile
179 variable overrides for each directory variable is required by the GNU
180 Coding Standards, and ideally causes no recompilation. However, some
181 platforms have known limitations with the semantics of shared libraries
182 that end up requiring recompilation when using this method, particularly
183 noticeable in packages that use GNU Libtool.
185 The second method involves providing the 'DESTDIR' variable. For
186 example, 'make install DESTDIR=/alternate/directory' will prepend
187 '/alternate/directory' before all installation names. The approach of
188 'DESTDIR' overrides is not required by the GNU Coding Standards, and
189 does not work on platforms that have drive letters. On the other hand,
190 it does better at avoiding recompilation issues, and works well even
191 when some directory options were not specified in terms of '${prefix}'
197 If the package supports it, you can cause programs to be installed
198 with an extra prefix or suffix on their names by giving 'configure' the
199 option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
201 Some packages pay attention to '--enable-FEATURE' and
202 '--disable-FEATURE' options to 'configure', where FEATURE indicates an
203 optional part of the package. They may also pay attention to
204 '--with-PACKAGE' and '--without-PACKAGE' options, where PACKAGE is
205 something like 'gnu-ld'. './configure --help' should mention the
206 '--enable-...' and '--with-...' options that the package recognizes.
208 Some packages offer the ability to configure how verbose the
209 execution of 'make' will be. For these packages, running './configure
210 --enable-silent-rules' sets the default to minimal output, which can be
211 overridden with 'make V=1'; while running './configure
212 --disable-silent-rules' sets the default to verbose, which can be
213 overridden with 'make V=0'.
215 Specifying a System Type
216 ========================
218 By default 'configure' builds for the current system. To create
219 binaries that can run on a different system type, specify a
220 '--host=TYPE' option along with compiler variables that specify how to
221 generate object code for TYPE. For example, to create binaries intended
222 to run on a 64-bit ARM processor:
224 ./configure --host=aarch64-linux-gnu \
225 CC=aarch64-linux-gnu-gcc \
226 CXX=aarch64-linux-gnu-g++
228 If done on a machine that can execute these binaries (e.g., via
229 'qemu-aarch64', '$QEMU_LD_PREFIX', and Linux's 'binfmt_misc'
230 capability), the build behaves like a native build. Otherwise it is a
231 cross-build: 'configure' will make cross-compilation guesses instead of
232 running test programs, and 'make check' will not work.
234 A system type can either be a short name like 'mingw64', or a
235 canonical name like 'x86_64-pc-linux-gnu'. Canonical names have the
236 form CPU-COMPANY-SYSTEM where SYSTEM is either OS or KERNEL-OS. To
237 canonicalize and validate a system type, you can run the command
238 'config.sub', which is often squirreled away in a subdirectory like
239 'build-aux'. For example:
241 $ build-aux/config.sub arm64-linux
242 aarch64-unknown-linux-gnu
243 $ build-aux/config.sub riscv-lnx
244 Invalid configuration 'riscv-lnx': OS 'lnx' not recognized
246 You can look at the 'config.sub' file to see which types are recognized.
247 If the file is absent, this package does not need the system type.
249 If 'configure' fails with the diagnostic "cannot guess build type".
250 'config.sub' did not recognize your system's type. In this case, first
251 fetch the newest versions of these files from the GNU config package
252 (https://savannah.gnu.org/projects/config). If that fixes things,
253 please report it to the maintainers of the package containing
254 'configure'. Otherwise, you can try the configure option '--build=TYPE'
255 where TYPE comes close to your system type; also, please report the
256 problem to <config-patches@gnu.org>.
258 For more details about configuring system types, see the Autoconf
264 If you want to set default values for 'configure' scripts to share,
265 you can create a site shell script called 'config.site' that gives
266 default values for variables like 'CC', 'cache_file', and 'prefix'.
267 'configure' looks for 'PREFIX/share/config.site' if it exists, then
268 'PREFIX/etc/config.site' if it exists. Or, you can set the
269 'CONFIG_SITE' environment variable to the location of the site script.
270 A warning: not all 'configure' scripts look for a site script.
275 Variables not defined in a site shell script can be set in the
276 environment passed to 'configure'. However, some packages may run
277 configure again during the build, and the customized values of these
278 variables may be lost. In order to avoid this problem, you should set
279 them in the 'configure' command line, using 'VAR=value'. For example:
281 ./configure CC=/usr/local2/bin/gcc
283 causes the specified 'gcc' to be used as the C compiler (unless it is
284 overridden in the site shell script).
286 Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
287 Autoconf limitation. Until the limitation is lifted, you can use this
290 CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
292 'configure' Invocation
293 ======================
295 'configure' recognizes the following options to control how it
300 Print a summary of all of the options to 'configure', and exit.
304 Print a summary of the options unique to this package's
305 'configure', and exit. The 'short' variant lists options used only
306 in the top level, while the 'recursive' variant lists options also
307 present in any nested packages.
311 Print the version of Autoconf used to generate the 'configure'
315 Enable the cache: use and save the results of the tests in FILE,
316 traditionally 'config.cache'. FILE defaults to '/dev/null' to
321 Alias for '--cache-file=config.cache'.
324 Look for the package's source code in directory DIR. Usually
325 'configure' can determine that directory automatically.
328 Use DIR as the installation prefix. See "Installation Names" for
329 more details, including other options available for fine-tuning the
330 installation locations.
333 Build binaries for system TYPE. See "Specifying a System Type".
337 Enable or disable the optional FEATURE. See "Optional Features".
341 Use or omit PACKAGE when building. See "Optional Features".
346 Do not print messages saying which checks are being made. To
347 suppress all normal output, redirect it to '/dev/null' (any error
348 messages will still be shown).
352 Run the configure checks, but stop before creating any output
355 'configure' also recognizes several environment variables, and accepts
356 some other, less widely useful, options. Run 'configure --help' for
362 Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2024 Free Software
365 Copying and distribution of this file, with or without modification,
366 are permitted in any medium without royalty provided the copyright
367 notice and this notice are preserved. This file is offered as-is,
368 without warranty of any kind.