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