blob: 7958936a38cb9f9269dddd50f2afb4049e6e9dfb [file] [log] [blame]
Jeongik Cha1199caa2021-07-20 12:32:58 +09001Installation Instructions
2*************************
3
4Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
5Software Foundation, Inc.
6
7This file is free documentation; the Free Software Foundation gives
8unlimited permission to copy, distribute and modify it.
9
10Installation from Cloned Git Repository
11=======================================
12
13If you obtained the package by cloning the git repository, there are some
14additional steps required to build the package, as the generated 'configure'
15script and other supporting build files are not included in the repository.
16
17You must have the GNU autotools installed:
18
19- autoconf (version 2.69 or newer recommended)
20- automake (version 1.15 or newer recommended)
21- libtool (version 2.4.6 or newer recommended)
22
23If you plan to modify the source code, you may also need the following:
24
25- GNU Bison (verison 3.0.4 or newer required)
26- flex (version 2.6.4 or newer required)
27
28Generate the 'configure' script and other necessary build files by running
29'autoreconf' in the toplevel libconfig directory.
30
31Then, follow the basic installation instructions below.
32
33Basic Installation
34==================
35
36These are generic installation instructions when building from a released
37distribution tarball.
38
39 The `configure' shell script attempts to guess correct values for
40various system-dependent variables used during compilation. It uses
41those values to create a `Makefile' in each directory of the package.
42It may also create one or more `.h' files containing system-dependent
43definitions. Finally, it creates a shell script `config.status' that
44you can run in the future to recreate the current configuration, and a
45file `config.log' containing compiler output (useful mainly for
46debugging `configure').
47
48 It can also use an optional file (typically called `config.cache'
49and enabled with `--cache-file=config.cache' or simply `-C') that saves
50the results of its tests to speed up reconfiguring. (Caching is
51disabled by default to prevent problems with accidental use of stale
52cache files.)
53
54 If you need to do unusual things to compile the package, please try
55to figure out how `configure' could check whether to do them, and mail
56diffs or instructions to the address given in the `README' so they can
57be considered for the next release. If you are using the cache, and at
58some point `config.cache' contains results you don't want to keep, you
59may remove or edit it.
60
61 The file `configure.ac' (or `configure.in') is used to create
62`configure' by a program called `autoconf'. You only need
63`configure.ac' if you want to change it or regenerate `configure' using
64a newer version of `autoconf'.
65
66The simplest way to compile this package is:
67
68 1. `cd' to the directory containing the package's source code and type
69 `./configure' to configure the package for your system. If you're
70 using `csh' on an old version of System V, you might need to type
71 `sh ./configure' instead to prevent `csh' from trying to execute
72 `configure' itself.
73
74 Running `configure' takes awhile. While running, it prints some
75 messages telling which features it is checking for.
76
77 2. Type `make' to compile the package.
78
79 3. Optionally, type `make check' to run any self-tests that come with
80 the package.
81
82 4. Type `make install' to install the programs and any data files and
83 documentation.
84
85 5. You can remove the program binaries and object files from the
86 source code directory by typing `make clean'. To also remove the
87 files that `configure' created (so you can compile the package for
88 a different kind of computer), type `make distclean'. There is
89 also a `make maintainer-clean' target, but that is intended mainly
90 for the package's developers. If you use it, you may have to get
91 all sorts of other programs in order to regenerate files that came
92 with the distribution.
93
94Compilers and Options
95=====================
96
97Some systems require unusual options for compilation or linking that the
98`configure' script does not know about. Run `./configure --help' for
99details on some of the pertinent environment variables.
100
101 You can give `configure' initial values for configuration parameters
102by setting variables in the command line or in the environment. Here
103is an example:
104
105 ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
106
107 *Note Defining Variables::, for more details.
108
109Compiling For Multiple Architectures
110====================================
111
112You can compile the package for more than one kind of computer at the
113same time, by placing the object files for each architecture in their
114own directory. To do this, you must use a version of `make' that
115supports the `VPATH' variable, such as GNU `make'. `cd' to the
116directory where you want the object files and executables to go and run
117the `configure' script. `configure' automatically checks for the
118source code in the directory that `configure' is in and in `..'.
119
120 If you have to use a `make' that does not support the `VPATH'
121variable, you have to compile the package for one architecture at a
122time in the source code directory. After you have installed the
123package for one architecture, use `make distclean' before reconfiguring
124for another architecture.
125
126Installation Names
127==================
128
129By default, `make install' will install the package's files in
130`/usr/local/bin', `/usr/local/man', etc. You can specify an
131installation prefix other than `/usr/local' by giving `configure' the
132option `--prefix=PREFIX'.
133
134 You can specify separate installation prefixes for
135architecture-specific files and architecture-independent files. If you
136give `configure' the option `--exec-prefix=PREFIX', the package will
137use PREFIX as the prefix for installing programs and libraries.
138Documentation and other data files will still use the regular prefix.
139
140 In addition, if you use an unusual directory layout you can give
141options like `--bindir=DIR' to specify different values for particular
142kinds of files. Run `configure --help' for a list of the directories
143you can set and what kinds of files go in them.
144
145 If the package supports it, you can cause programs to be installed
146with an extra prefix or suffix on their names by giving `configure' the
147option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
148
149Optional Features
150=================
151
152Some packages pay attention to `--enable-FEATURE' options to
153`configure', where FEATURE indicates an optional part of the package.
154They may also pay attention to `--with-PACKAGE' options, where PACKAGE
155is something like `gnu-as' or `x' (for the X Window System). The
156`README' should mention any `--enable-' and `--with-' options that the
157package recognizes.
158
159 For packages that use the X Window System, `configure' can usually
160find the X include and library files automatically, but if it doesn't,
161you can use the `configure' options `--x-includes=DIR' and
162`--x-libraries=DIR' to specify their locations.
163
164Specifying the System Type
165==========================
166
167There may be some features `configure' cannot figure out automatically,
168but needs to determine by the type of machine the package will run on.
169Usually, assuming the package is built to be run on the _same_
170architectures, `configure' can figure that out, but if it prints a
171message saying it cannot guess the machine type, give it the
172`--build=TYPE' option. TYPE can either be a short name for the system
173type, such as `sun4', or a canonical name which has the form:
174
175 CPU-COMPANY-SYSTEM
176
177where SYSTEM can have one of these forms:
178
179 OS KERNEL-OS
180
181 See the file `config.sub' for the possible values of each field. If
182`config.sub' isn't included in this package, then this package doesn't
183need to know the machine type.
184
185 If you are _building_ compiler tools for cross-compiling, you should
186use the `--target=TYPE' option to select the type of system they will
187produce code for.
188
189 If you want to _use_ a cross compiler, that generates code for a
190platform different from the build platform, you should specify the
191"host" platform (i.e., that on which the generated programs will
192eventually be run) with `--host=TYPE'.
193
194Sharing Defaults
195================
196
197If you want to set default values for `configure' scripts to share, you
198can create a site shell script called `config.site' that gives default
199values for variables like `CC', `cache_file', and `prefix'.
200`configure' looks for `PREFIX/share/config.site' if it exists, then
201`PREFIX/etc/config.site' if it exists. Or, you can set the
202`CONFIG_SITE' environment variable to the location of the site script.
203A warning: not all `configure' scripts look for a site script.
204
205Defining Variables
206==================
207
208Variables not defined in a site shell script can be set in the
209environment passed to `configure'. However, some packages may run
210configure again during the build, and the customized values of these
211variables may be lost. In order to avoid this problem, you should set
212them in the `configure' command line, using `VAR=value'. For example:
213
214 ./configure CC=/usr/local2/bin/gcc
215
216will cause the specified gcc to be used as the C compiler (unless it is
217overridden in the site shell script).
218
219`configure' Invocation
220======================
221
222`configure' recognizes the following options to control how it operates.
223
224`--help'
225`-h'
226 Print a summary of the options to `configure', and exit.
227
228`--version'
229`-V'
230 Print the version of Autoconf used to generate the `configure'
231 script, and exit.
232
233`--cache-file=FILE'
234 Enable the cache: use and save the results of the tests in FILE,
235 traditionally `config.cache'. FILE defaults to `/dev/null' to
236 disable caching.
237
238`--config-cache'
239`-C'
240 Alias for `--cache-file=config.cache'.
241
242`--quiet'
243`--silent'
244`-q'
245 Do not print messages saying which checks are being made. To
246 suppress all normal output, redirect it to `/dev/null' (any error
247 messages will still be shown).
248
249`--srcdir=DIR'
250 Look for the package's source code in directory DIR. Usually
251 `configure' can determine that directory automatically.
252
253`configure' also accepts some other, not widely useful, options. Run
254`configure --help' for more details.
255