xref: /iperf/INSTALL (revision 56a97f93)
1*56a97f93SjefInstallation Instructions
2*56a97f93Sjef*************************
3aa594bbbSJon Dugan
4*56a97f93SjefCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
5*56a97f93SjefSoftware Foundation, Inc.
6aa594bbbSJon Dugan
7*56a97f93SjefThis file is free documentation; the Free Software Foundation gives
8*56a97f93Sjefunlimited permission to copy, distribute and modify it.
9aa594bbbSJon Dugan
10*56a97f93SjefBasic Installation
11*56a97f93Sjef==================
12aa594bbbSJon Dugan
13*56a97f93SjefThese are generic installation instructions.
14*56a97f93Sjef
15*56a97f93Sjef   The `configure' shell script attempts to guess correct values for
16*56a97f93Sjefvarious system-dependent variables used during compilation.  It uses
17*56a97f93Sjefthose values to create a `Makefile' in each directory of the package.
18*56a97f93SjefIt may also create one or more `.h' files containing system-dependent
19*56a97f93Sjefdefinitions.  Finally, it creates a shell script `config.status' that
20*56a97f93Sjefyou can run in the future to recreate the current configuration, and a
21*56a97f93Sjeffile `config.log' containing compiler output (useful mainly for
22*56a97f93Sjefdebugging `configure').
23*56a97f93Sjef
24*56a97f93Sjef   It can also use an optional file (typically called `config.cache'
25*56a97f93Sjefand enabled with `--cache-file=config.cache' or simply `-C') that saves
26*56a97f93Sjefthe results of its tests to speed up reconfiguring.  (Caching is
27*56a97f93Sjefdisabled by default to prevent problems with accidental use of stale
28*56a97f93Sjefcache files.)
29*56a97f93Sjef
30*56a97f93Sjef   If you need to do unusual things to compile the package, please try
31*56a97f93Sjefto figure out how `configure' could check whether to do them, and mail
32*56a97f93Sjefdiffs or instructions to the address given in the `README' so they can
33*56a97f93Sjefbe considered for the next release.  If you are using the cache, and at
34*56a97f93Sjefsome point `config.cache' contains results you don't want to keep, you
35*56a97f93Sjefmay remove or edit it.
36*56a97f93Sjef
37*56a97f93Sjef   The file `configure.ac' (or `configure.in') is used to create
38*56a97f93Sjef`configure' by a program called `autoconf'.  You only need
39*56a97f93Sjef`configure.ac' if you want to change it or regenerate `configure' using
40*56a97f93Sjefa newer version of `autoconf'.
41*56a97f93Sjef
42*56a97f93SjefThe simplest way to compile this package is:
43*56a97f93Sjef
44*56a97f93Sjef  1. `cd' to the directory containing the package's source code and type
45*56a97f93Sjef     `./configure' to configure the package for your system.  If you're
46*56a97f93Sjef     using `csh' on an old version of System V, you might need to type
47*56a97f93Sjef     `sh ./configure' instead to prevent `csh' from trying to execute
48*56a97f93Sjef     `configure' itself.
49*56a97f93Sjef
50*56a97f93Sjef     Running `configure' takes awhile.  While running, it prints some
51*56a97f93Sjef     messages telling which features it is checking for.
52*56a97f93Sjef
53*56a97f93Sjef  2. Type `make' to compile the package.
54*56a97f93Sjef
55*56a97f93Sjef  3. Optionally, type `make check' to run any self-tests that come with
56*56a97f93Sjef     the package.
57*56a97f93Sjef
58*56a97f93Sjef  4. Type `make install' to install the programs and any data files and
59*56a97f93Sjef     documentation.
60*56a97f93Sjef
61*56a97f93Sjef  5. You can remove the program binaries and object files from the
62*56a97f93Sjef     source code directory by typing `make clean'.  To also remove the
63*56a97f93Sjef     files that `configure' created (so you can compile the package for
64*56a97f93Sjef     a different kind of computer), type `make distclean'.  There is
65*56a97f93Sjef     also a `make maintainer-clean' target, but that is intended mainly
66*56a97f93Sjef     for the package's developers.  If you use it, you may have to get
67*56a97f93Sjef     all sorts of other programs in order to regenerate files that came
68*56a97f93Sjef     with the distribution.
69*56a97f93Sjef
70*56a97f93SjefCompilers and Options
71*56a97f93Sjef=====================
72*56a97f93Sjef
73*56a97f93SjefSome systems require unusual options for compilation or linking that the
74*56a97f93Sjef`configure' script does not know about.  Run `./configure --help' for
75*56a97f93Sjefdetails on some of the pertinent environment variables.
76*56a97f93Sjef
77*56a97f93Sjef   You can give `configure' initial values for configuration parameters
78*56a97f93Sjefby setting variables in the command line or in the environment.  Here
79*56a97f93Sjefis an example:
80*56a97f93Sjef
81*56a97f93Sjef     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
82*56a97f93Sjef
83*56a97f93Sjef   *Note Defining Variables::, for more details.
84*56a97f93Sjef
85*56a97f93SjefCompiling For Multiple Architectures
86*56a97f93Sjef====================================
87*56a97f93Sjef
88*56a97f93SjefYou can compile the package for more than one kind of computer at the
89*56a97f93Sjefsame time, by placing the object files for each architecture in their
90*56a97f93Sjefown directory.  To do this, you must use a version of `make' that
91*56a97f93Sjefsupports the `VPATH' variable, such as GNU `make'.  `cd' to the
92*56a97f93Sjefdirectory where you want the object files and executables to go and run
93*56a97f93Sjefthe `configure' script.  `configure' automatically checks for the
94*56a97f93Sjefsource code in the directory that `configure' is in and in `..'.
95*56a97f93Sjef
96*56a97f93Sjef   If you have to use a `make' that does not support the `VPATH'
97*56a97f93Sjefvariable, you have to compile the package for one architecture at a
98*56a97f93Sjeftime in the source code directory.  After you have installed the
99*56a97f93Sjefpackage for one architecture, use `make distclean' before reconfiguring
100*56a97f93Sjeffor another architecture.
101*56a97f93Sjef
102*56a97f93SjefInstallation Names
103*56a97f93Sjef==================
104*56a97f93Sjef
105*56a97f93SjefBy default, `make install' installs the package's commands under
106*56a97f93Sjef`/usr/local/bin', include files under `/usr/local/include', etc.  You
107*56a97f93Sjefcan specify an installation prefix other than `/usr/local' by giving
108*56a97f93Sjef`configure' the option `--prefix=PREFIX'.
109*56a97f93Sjef
110*56a97f93Sjef   You can specify separate installation prefixes for
111*56a97f93Sjefarchitecture-specific files and architecture-independent files.  If you
112*56a97f93Sjefpass the option `--exec-prefix=PREFIX' to `configure', the package uses
113*56a97f93SjefPREFIX as the prefix for installing programs and libraries.
114*56a97f93SjefDocumentation and other data files still use the regular prefix.
115*56a97f93Sjef
116*56a97f93Sjef   In addition, if you use an unusual directory layout you can give
117*56a97f93Sjefoptions like `--bindir=DIR' to specify different values for particular
118*56a97f93Sjefkinds of files.  Run `configure --help' for a list of the directories
119*56a97f93Sjefyou can set and what kinds of files go in them.
120*56a97f93Sjef
121*56a97f93Sjef   If the package supports it, you can cause programs to be installed
122*56a97f93Sjefwith an extra prefix or suffix on their names by giving `configure' the
123*56a97f93Sjefoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
124*56a97f93Sjef
125*56a97f93SjefOptional Features
126*56a97f93Sjef=================
127*56a97f93Sjef
128*56a97f93SjefSome packages pay attention to `--enable-FEATURE' options to
129*56a97f93Sjef`configure', where FEATURE indicates an optional part of the package.
130*56a97f93SjefThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
131*56a97f93Sjefis something like `gnu-as' or `x' (for the X Window System).  The
132*56a97f93Sjef`README' should mention any `--enable-' and `--with-' options that the
133*56a97f93Sjefpackage recognizes.
134*56a97f93Sjef
135*56a97f93Sjef   For packages that use the X Window System, `configure' can usually
136*56a97f93Sjeffind the X include and library files automatically, but if it doesn't,
137*56a97f93Sjefyou can use the `configure' options `--x-includes=DIR' and
138*56a97f93Sjef`--x-libraries=DIR' to specify their locations.
139*56a97f93Sjef
140*56a97f93SjefSpecifying the System Type
141*56a97f93Sjef==========================
142*56a97f93Sjef
143*56a97f93SjefThere may be some features `configure' cannot figure out automatically,
144*56a97f93Sjefbut needs to determine by the type of machine the package will run on.
145*56a97f93SjefUsually, assuming the package is built to be run on the _same_
146*56a97f93Sjefarchitectures, `configure' can figure that out, but if it prints a
147*56a97f93Sjefmessage saying it cannot guess the machine type, give it the
148*56a97f93Sjef`--build=TYPE' option.  TYPE can either be a short name for the system
149*56a97f93Sjeftype, such as `sun4', or a canonical name which has the form:
150*56a97f93Sjef
151*56a97f93Sjef     CPU-COMPANY-SYSTEM
152*56a97f93Sjef
153*56a97f93Sjefwhere SYSTEM can have one of these forms:
154*56a97f93Sjef
155*56a97f93Sjef     OS KERNEL-OS
156*56a97f93Sjef
157*56a97f93Sjef   See the file `config.sub' for the possible values of each field.  If
158*56a97f93Sjef`config.sub' isn't included in this package, then this package doesn't
159*56a97f93Sjefneed to know the machine type.
160*56a97f93Sjef
161*56a97f93Sjef   If you are _building_ compiler tools for cross-compiling, you should
162*56a97f93Sjefuse the option `--target=TYPE' to select the type of system they will
163*56a97f93Sjefproduce code for.
164*56a97f93Sjef
165*56a97f93Sjef   If you want to _use_ a cross compiler, that generates code for a
166*56a97f93Sjefplatform different from the build platform, you should specify the
167*56a97f93Sjef"host" platform (i.e., that on which the generated programs will
168*56a97f93Sjefeventually be run) with `--host=TYPE'.
169*56a97f93Sjef
170*56a97f93SjefSharing Defaults
171*56a97f93Sjef================
172*56a97f93Sjef
173*56a97f93SjefIf you want to set default values for `configure' scripts to share, you
174*56a97f93Sjefcan create a site shell script called `config.site' that gives default
175*56a97f93Sjefvalues for variables like `CC', `cache_file', and `prefix'.
176*56a97f93Sjef`configure' looks for `PREFIX/share/config.site' if it exists, then
177*56a97f93Sjef`PREFIX/etc/config.site' if it exists.  Or, you can set the
178*56a97f93Sjef`CONFIG_SITE' environment variable to the location of the site script.
179*56a97f93SjefA warning: not all `configure' scripts look for a site script.
180*56a97f93Sjef
181*56a97f93SjefDefining Variables
182*56a97f93Sjef==================
183*56a97f93Sjef
184*56a97f93SjefVariables not defined in a site shell script can be set in the
185*56a97f93Sjefenvironment passed to `configure'.  However, some packages may run
186*56a97f93Sjefconfigure again during the build, and the customized values of these
187*56a97f93Sjefvariables may be lost.  In order to avoid this problem, you should set
188*56a97f93Sjefthem in the `configure' command line, using `VAR=value'.  For example:
189*56a97f93Sjef
190*56a97f93Sjef     ./configure CC=/usr/local2/bin/gcc
191*56a97f93Sjef
192*56a97f93Sjefcauses the specified `gcc' to be used as the C compiler (unless it is
193*56a97f93Sjefoverridden in the site shell script).  Here is a another example:
194*56a97f93Sjef
195*56a97f93Sjef     /bin/bash ./configure CONFIG_SHELL=/bin/bash
196*56a97f93Sjef
197*56a97f93SjefHere the `CONFIG_SHELL=/bin/bash' operand causes subsequent
198*56a97f93Sjefconfiguration-related scripts to be executed by `/bin/bash'.
199*56a97f93Sjef
200*56a97f93Sjef`configure' Invocation
201*56a97f93Sjef======================
202*56a97f93Sjef
203*56a97f93Sjef`configure' recognizes the following options to control how it operates.
204*56a97f93Sjef
205*56a97f93Sjef`--help'
206*56a97f93Sjef`-h'
207*56a97f93Sjef     Print a summary of the options to `configure', and exit.
208*56a97f93Sjef
209*56a97f93Sjef`--version'
210*56a97f93Sjef`-V'
211*56a97f93Sjef     Print the version of Autoconf used to generate the `configure'
212*56a97f93Sjef     script, and exit.
213*56a97f93Sjef
214*56a97f93Sjef`--cache-file=FILE'
215*56a97f93Sjef     Enable the cache: use and save the results of the tests in FILE,
216*56a97f93Sjef     traditionally `config.cache'.  FILE defaults to `/dev/null' to
217*56a97f93Sjef     disable caching.
218*56a97f93Sjef
219*56a97f93Sjef`--config-cache'
220*56a97f93Sjef`-C'
221*56a97f93Sjef     Alias for `--cache-file=config.cache'.
222*56a97f93Sjef
223*56a97f93Sjef`--quiet'
224*56a97f93Sjef`--silent'
225*56a97f93Sjef`-q'
226*56a97f93Sjef     Do not print messages saying which checks are being made.  To
227*56a97f93Sjef     suppress all normal output, redirect it to `/dev/null' (any error
228*56a97f93Sjef     messages will still be shown).
229*56a97f93Sjef
230*56a97f93Sjef`--srcdir=DIR'
231*56a97f93Sjef     Look for the package's source code in directory DIR.  Usually
232*56a97f93Sjef     `configure' can determine that directory automatically.
233*56a97f93Sjef
234*56a97f93Sjef`configure' also accepts some other, not widely useful, options.  Run
235*56a97f93Sjef`configure --help' for more details.
236aa594bbbSJon Dugan
237