xref: /freebsd/contrib/ntp/INSTALL (revision ea906c4152774dff300bb26fbfc1e4188351c89a)
1c0b746e5SOllivier RobertBasic Installation
2c0b746e5SOllivier Robert==================
3c0b746e5SOllivier Robert
4c0b746e5SOllivier Robert   These are generic *nix installation instructions.
5c0b746e5SOllivier Robert
6ea906c41SOllivier Robert   For Windows/NT, please see ports/winnt and html/build/hints/winnt.html.
7c0b746e5SOllivier Robert
8c0b746e5SOllivier Robert   The `configure' shell script attempts to guess correct values for
9c0b746e5SOllivier Robertvarious system-dependent variables used during compilation.  It uses
10c0b746e5SOllivier Robertthose values to create a `Makefile' in each directory of the package.
11c0b746e5SOllivier RobertIt may also create one or more `.h' files containing system-dependent
12c0b746e5SOllivier Robertdefinitions.  Finally, it creates a shell script `config.status' that
13c0b746e5SOllivier Robertyou can run in the future to recreate the current configuration, a file
14c0b746e5SOllivier Robert`config.cache' that saves the results of its tests to speed up
15c0b746e5SOllivier Robertreconfiguring, and a file `config.log' containing compiler output
16c0b746e5SOllivier Robert(useful mainly for debugging `configure').
17c0b746e5SOllivier Robert
18c0b746e5SOllivier Robert   If you need to do unusual things to compile the package, please try
19c0b746e5SOllivier Robertto figure out how `configure' could check whether to do them, and mail
20c0b746e5SOllivier Robertdiffs or instructions to the address given in the `README' so they can
21c0b746e5SOllivier Robertbe considered for the next release.  If at some point `config.cache'
22c0b746e5SOllivier Robertcontains results you don't want to keep, you may remove or edit it.
23c0b746e5SOllivier Robert
24c0b746e5SOllivier Robert   The file `configure.in' is used to create `configure' by a program
25c0b746e5SOllivier Robertcalled `autoconf'.  You only need `configure.in' if you want to change
26c0b746e5SOllivier Robertit or regenerate `configure' using a newer version of `autoconf'.
27c0b746e5SOllivier Robert
28c0b746e5SOllivier RobertThe simplest way to compile this package is:
29c0b746e5SOllivier Robert
30c0b746e5SOllivier Robert  1. `cd' to the directory containing the package's source code and type
31c0b746e5SOllivier Robert     `./configure' to configure the package for your system.  If you're
32c0b746e5SOllivier Robert     using `csh' on an old version of System V, you might need to type
33c0b746e5SOllivier Robert     `sh ./configure' instead to prevent `csh' from trying to execute
34c0b746e5SOllivier Robert     `configure' itself.
35c0b746e5SOllivier Robert
36c0b746e5SOllivier Robert     Running `configure' takes a while.  While running, it prints some
37c0b746e5SOllivier Robert     messages telling which features it is checking for.
38c0b746e5SOllivier Robert
39c0b746e5SOllivier Robert  2. Type `make' to compile the package.
40c0b746e5SOllivier Robert
41c0b746e5SOllivier Robert  3. Optionally, type `make check' to run any self-tests that come with
42c0b746e5SOllivier Robert     the package.
43c0b746e5SOllivier Robert
44c0b746e5SOllivier Robert  4. Type `make install' to install the programs and any data files and
45c0b746e5SOllivier Robert     documentation.
46c0b746e5SOllivier Robert
47c0b746e5SOllivier Robert  5. You can remove the program binaries and object files from the
48c0b746e5SOllivier Robert     source code directory by typing `make clean'.  To also remove the
49c0b746e5SOllivier Robert     files that `configure' created (so you can compile the package for
50c0b746e5SOllivier Robert     a different kind of computer), type `make distclean'.  There is
51c0b746e5SOllivier Robert     also a `make maintainer-clean' target, but that is intended mainly
52c0b746e5SOllivier Robert     for the package's developers.  If you use it, you may have to get
53c0b746e5SOllivier Robert     all sorts of other programs in order to regenerate files that came
54c0b746e5SOllivier Robert     with the distribution.
55c0b746e5SOllivier Robert
56c0b746e5SOllivier RobertCompilers and Options
57c0b746e5SOllivier Robert=====================
58c0b746e5SOllivier Robert
59c0b746e5SOllivier Robert   Some systems require unusual options for compilation or linking that
60c0b746e5SOllivier Robertthe `configure' script does not know about.  You can give `configure'
61c0b746e5SOllivier Robertinitial values for variables by setting them in the environment.  Using
62c0b746e5SOllivier Roberta Bourne-compatible shell, you can do that on the command line like
63c0b746e5SOllivier Robertthis:
64c0b746e5SOllivier Robert     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
65c0b746e5SOllivier Robert
66c0b746e5SOllivier RobertOr on systems that have the `env' program, you can do it like this:
67c0b746e5SOllivier Robert     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
68c0b746e5SOllivier Robert
69c0b746e5SOllivier RobertCompiling For Multiple Architectures
70c0b746e5SOllivier Robert====================================
71c0b746e5SOllivier Robert
72c0b746e5SOllivier Robert   You can compile the package for more than one kind of computer at the
73c0b746e5SOllivier Robertsame time, by placing the object files for each architecture in their
74c0b746e5SOllivier Robertown directory.  To do this, you must use a version of `make' that
75c0b746e5SOllivier Robertsupports the `VPATH' variable, such as GNU `make'.  `cd' to the
76c0b746e5SOllivier Robertdirectory where you want the object files and executables to go and run
77c0b746e5SOllivier Robertthe `configure' script.  `configure' automatically checks for the
78c0b746e5SOllivier Robertsource code in the directory that `configure' is in and in `..'.
79c0b746e5SOllivier Robert
80c0b746e5SOllivier Robert   If you have to use a `make' that does not supports the `VPATH'
81c0b746e5SOllivier Robertvariable, you have to compile the package for one architecture at a time
82c0b746e5SOllivier Robertin the source code directory.  After you have installed the package for
83c0b746e5SOllivier Robertone architecture, use `make distclean' before reconfiguring for another
84c0b746e5SOllivier Robertarchitecture.
85c0b746e5SOllivier Robert
86c0b746e5SOllivier RobertInstallation Names
87c0b746e5SOllivier Robert==================
88c0b746e5SOllivier Robert
89c0b746e5SOllivier Robert   By default, `make install' will install the package's files in
90c0b746e5SOllivier Robert`/usr/local/bin', `/usr/local/man', etc.  You can specify an
91c0b746e5SOllivier Robertinstallation prefix other than `/usr/local' by giving `configure' the
92c0b746e5SOllivier Robertoption `--prefix=PATH'.
93c0b746e5SOllivier Robert
94c0b746e5SOllivier Robert   You can specify separate installation prefixes for
95c0b746e5SOllivier Robertarchitecture-specific files and architecture-independent files.  If you
96c0b746e5SOllivier Robertgive `configure' the option `--exec-prefix=PATH', the package will use
97c0b746e5SOllivier RobertPATH as the prefix for installing programs and libraries.
98c0b746e5SOllivier RobertDocumentation and other data files will still use the regular prefix.
99c0b746e5SOllivier Robert
100c0b746e5SOllivier Robert   If the package supports it, you can cause programs to be installed
101c0b746e5SOllivier Robertwith an extra prefix or suffix on their names by giving `configure' the
102c0b746e5SOllivier Robertoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
103c0b746e5SOllivier Robert
104c0b746e5SOllivier RobertOptional Features
105c0b746e5SOllivier Robert=================
106c0b746e5SOllivier Robert
107c0b746e5SOllivier Robert   Some packages pay attention to `--enable-FEATURE' options to
108c0b746e5SOllivier Robert`configure', where FEATURE indicates an optional part of the package.
109c0b746e5SOllivier RobertThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
110c0b746e5SOllivier Robertis something like `gnu-as' or `x' (for the X Window System).  The
111c0b746e5SOllivier Robert`README' should mention any `--enable-' and `--with-' options that the
112c0b746e5SOllivier Robertpackage recognizes.
113c0b746e5SOllivier Robert
114c0b746e5SOllivier Robert   For packages that use the X Window System, `configure' can usually
115c0b746e5SOllivier Robertfind the X include and library files automatically, but if it doesn't,
116c0b746e5SOllivier Robertyou can use the `configure' options `--x-includes=DIR' and
117c0b746e5SOllivier Robert`--x-libraries=DIR' to specify their locations.
118c0b746e5SOllivier Robert
119c0b746e5SOllivier RobertSpecifying the System Type
120c0b746e5SOllivier Robert==========================
121c0b746e5SOllivier Robert
122c0b746e5SOllivier Robert   There may be some features `configure' can not figure out
123c0b746e5SOllivier Robertautomatically, but needs to determine by the type of host the package
124c0b746e5SOllivier Robertwill run on.  Usually `configure' can figure that out, but if it prints
125c0b746e5SOllivier Roberta message saying it can not guess the host type, give it the
126c0b746e5SOllivier Robert`--host=TYPE' option.  TYPE can either be a short name for the system
127c0b746e5SOllivier Roberttype, such as `sun4', or a canonical name with three fields:
128c0b746e5SOllivier Robert     CPU-COMPANY-SYSTEM
129c0b746e5SOllivier Robert
130c0b746e5SOllivier RobertSee the file `config.sub' for the possible values of each field.  If
131c0b746e5SOllivier Robert`config.sub' isn't included in this package, then this package doesn't
132c0b746e5SOllivier Robertneed to know the host type.
133c0b746e5SOllivier Robert
134c0b746e5SOllivier Robert   If you are building compiler tools for cross-compiling, you can also
135c0b746e5SOllivier Robertuse the `--target=TYPE' option to select the type of system they will
136c0b746e5SOllivier Robertproduce code for and the `--build=TYPE' option to select the type of
137c0b746e5SOllivier Robertsystem on which you are compiling the package.
138c0b746e5SOllivier Robert
139c0b746e5SOllivier RobertSharing Defaults
140c0b746e5SOllivier Robert================
141c0b746e5SOllivier Robert
142c0b746e5SOllivier Robert   If you want to set default values for `configure' scripts to share,
143c0b746e5SOllivier Robertyou can create a site shell script called `config.site' that gives
144c0b746e5SOllivier Robertdefault values for variables like `CC', `cache_file', and `prefix'.
145c0b746e5SOllivier Robert`configure' looks for `PREFIX/share/config.site' if it exists, then
146c0b746e5SOllivier Robert`PREFIX/etc/config.site' if it exists.  Or, you can set the
147c0b746e5SOllivier Robert`CONFIG_SITE' environment variable to the location of the site script.
148c0b746e5SOllivier RobertA warning: not all `configure' scripts look for a site script.
149c0b746e5SOllivier Robert
150c0b746e5SOllivier RobertOperation Controls
151c0b746e5SOllivier Robert==================
152c0b746e5SOllivier Robert
153c0b746e5SOllivier Robert   `configure' recognizes the following options to control how it
154c0b746e5SOllivier Robertoperates.
155c0b746e5SOllivier Robert
156c0b746e5SOllivier Robert`--cache-file=FILE'
157c0b746e5SOllivier Robert     Use and save the results of the tests in FILE instead of
158c0b746e5SOllivier Robert     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
159c0b746e5SOllivier Robert     debugging `configure'.
160c0b746e5SOllivier Robert
161c0b746e5SOllivier Robert`--help'
162c0b746e5SOllivier Robert     Print a summary of the options to `configure', and exit.
163c0b746e5SOllivier Robert
164c0b746e5SOllivier Robert`--quiet'
165c0b746e5SOllivier Robert`--silent'
166c0b746e5SOllivier Robert`-q'
167c0b746e5SOllivier Robert     Do not print messages saying which checks are being made.
168c0b746e5SOllivier Robert
169c0b746e5SOllivier Robert`--srcdir=DIR'
170c0b746e5SOllivier Robert     Look for the package's source code in directory DIR.  Usually
171c0b746e5SOllivier Robert     `configure' can determine that directory automatically.
172c0b746e5SOllivier Robert
173c0b746e5SOllivier Robert`--version'
174c0b746e5SOllivier Robert     Print the version of Autoconf used to generate the `configure'
175c0b746e5SOllivier Robert     script, and exit.
176c0b746e5SOllivier Robert
177c0b746e5SOllivier Robert`configure' also accepts some other, not widely useful, options.
178c0b746e5SOllivier Robert
179