xref: /aosp_15_r20/external/sg3_utils/INSTALL (revision 44704f698541f6367e81f991ef8bb54ccbf3fc18)
1*44704f69SBart Van AsscheInstallation Instructions
2*44704f69SBart Van Assche*************************
3*44704f69SBart Van Assche
4*44704f69SBart Van AsscheCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5*44704f69SBart Van Assche2006, 2007 Free Software Foundation, Inc.
6*44704f69SBart Van Assche
7*44704f69SBart Van AsscheThis file is free documentation; the Free Software Foundation gives
8*44704f69SBart Van Asscheunlimited permission to copy, distribute and modify it.
9*44704f69SBart Van Assche
10*44704f69SBart Van AsscheBasic Installation
11*44704f69SBart Van Assche==================
12*44704f69SBart Van Assche
13*44704f69SBart Van AsscheBriefly, the shell commands './configure; make; make install' should
14*44704f69SBart Van Asscheconfigure, build, and install this package. If that fails try
15*44704f69SBart Van Asschedoing './autogen.sh' first and then repeat the above sequence. The
16*44704f69SBart Van Asscheautogen.sh script may require some autotools packages to be loaded.
17*44704f69SBart Van Assche
18*44704f69SBart Van AsscheThe following more detailed instructions are generic; see the `README'
19*44704f69SBart Van Asschefile for instructions specific to this package.
20*44704f69SBart Van Assche
21*44704f69SBart Van Assche   The `configure' shell script attempts to guess correct values for
22*44704f69SBart Van Asschevarious system-dependent variables used during compilation.  It uses
23*44704f69SBart Van Asschethose values to create a `Makefile' in each directory of the package.
24*44704f69SBart Van AsscheIt may also create one or more `.h' files containing system-dependent
25*44704f69SBart Van Asschedefinitions.  Finally, it creates a shell script `config.status' that
26*44704f69SBart Van Asscheyou can run in the future to recreate the current configuration, and a
27*44704f69SBart Van Asschefile `config.log' containing compiler output (useful mainly for
28*44704f69SBart Van Asschedebugging `configure').
29*44704f69SBart Van Assche
30*44704f69SBart Van Assche   It can also use an optional file (typically called `config.cache'
31*44704f69SBart Van Asscheand enabled with `--cache-file=config.cache' or simply `-C') that saves
32*44704f69SBart Van Asschethe results of its tests to speed up reconfiguring.  Caching is
33*44704f69SBart Van Asschedisabled by default to prevent problems with accidental use of stale
34*44704f69SBart Van Asschecache files.
35*44704f69SBart Van Assche
36*44704f69SBart Van Assche   If you need to do unusual things to compile the package, please try
37*44704f69SBart Van Asscheto figure out how `configure' could check whether to do them, and mail
38*44704f69SBart Van Asschediffs or instructions to the address given in the `README' so they can
39*44704f69SBart Van Asschebe considered for the next release.  If you are using the cache, and at
40*44704f69SBart Van Asschesome point `config.cache' contains results you don't want to keep, you
41*44704f69SBart Van Asschemay remove or edit it.
42*44704f69SBart Van Assche
43*44704f69SBart Van Assche   The file `configure.ac' (or `configure.in') is used to create
44*44704f69SBart Van Assche`configure' by a program called `autoconf'.  You need `configure.ac' if
45*44704f69SBart Van Asscheyou want to change it or regenerate `configure' using a newer version
46*44704f69SBart Van Asscheof `autoconf'.
47*44704f69SBart Van Assche
48*44704f69SBart Van AsscheThe simplest way to compile this package is:
49*44704f69SBart Van Assche
50*44704f69SBart Van Assche  1. `cd' to the directory containing the package's source code and type
51*44704f69SBart Van Assche     `./configure' to configure the package for your system.
52*44704f69SBart Van Assche
53*44704f69SBart Van Assche     Running `configure' might take a while.  While running, it prints
54*44704f69SBart Van Assche     some messages telling which features it is checking for.
55*44704f69SBart Van Assche
56*44704f69SBart Van Assche  2. Type `make' to compile the package.
57*44704f69SBart Van Assche
58*44704f69SBart Van Assche  3. Optionally, type `make check' to run any self-tests that come with
59*44704f69SBart Van Assche     the package.
60*44704f69SBart Van Assche
61*44704f69SBart Van Assche  4. Type `make install' to install the programs and any data files and
62*44704f69SBart Van Assche     documentation.
63*44704f69SBart Van Assche
64*44704f69SBart Van Assche  5. You can remove the program binaries and object files from the
65*44704f69SBart Van Assche     source code directory by typing `make clean'.  To also remove the
66*44704f69SBart Van Assche     files that `configure' created (so you can compile the package for
67*44704f69SBart Van Assche     a different kind of computer), type `make distclean'.  There is
68*44704f69SBart Van Assche     also a `make maintainer-clean' target, but that is intended mainly
69*44704f69SBart Van Assche     for the package's developers.  If you use it, you may have to get
70*44704f69SBart Van Assche     all sorts of other programs in order to regenerate files that came
71*44704f69SBart Van Assche     with the distribution.
72*44704f69SBart Van Assche
73*44704f69SBart Van Assche  6. Often, you can also type `make uninstall' to remove the installed
74*44704f69SBart Van Assche     files again.
75*44704f69SBart Van Assche
76*44704f69SBart Van AsscheCompilers and Options
77*44704f69SBart Van Assche=====================
78*44704f69SBart Van Assche
79*44704f69SBart Van AsscheSome systems require unusual options for compilation or linking that the
80*44704f69SBart Van Assche`configure' script does not know about.  Run `./configure --help' for
81*44704f69SBart Van Asschedetails on some of the pertinent environment variables.
82*44704f69SBart Van Assche
83*44704f69SBart Van Assche   You can give `configure' initial values for configuration parameters
84*44704f69SBart Van Asscheby setting variables in the command line or in the environment.  Here
85*44704f69SBart Van Asscheis an example:
86*44704f69SBart Van Assche
87*44704f69SBart Van Assche     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
88*44704f69SBart Van Assche
89*44704f69SBart Van Assche   *Note Defining Variables::, for more details.
90*44704f69SBart Van Assche
91*44704f69SBart Van AsscheCompiling For Multiple Architectures
92*44704f69SBart Van Assche====================================
93*44704f69SBart Van Assche
94*44704f69SBart Van AsscheYou can compile the package for more than one kind of computer at the
95*44704f69SBart Van Asschesame time, by placing the object files for each architecture in their
96*44704f69SBart Van Asscheown directory.  To do this, you can use GNU `make'.  `cd' to the
97*44704f69SBart Van Asschedirectory where you want the object files and executables to go and run
98*44704f69SBart Van Asschethe `configure' script.  `configure' automatically checks for the
99*44704f69SBart Van Asschesource code in the directory that `configure' is in and in `..'.
100*44704f69SBart Van Assche
101*44704f69SBart Van Assche   With a non-GNU `make', it is safer to compile the package for one
102*44704f69SBart Van Asschearchitecture at a time in the source code directory.  After you have
103*44704f69SBart Van Asscheinstalled the package for one architecture, use `make distclean' before
104*44704f69SBart Van Asschereconfiguring for another architecture.
105*44704f69SBart Van Assche
106*44704f69SBart Van AsscheInstallation Names
107*44704f69SBart Van Assche==================
108*44704f69SBart Van Assche
109*44704f69SBart Van AsscheBy default, `make install' installs the package's commands under
110*44704f69SBart Van Assche`/usr/local/bin', include files under `/usr/local/include', etc.  You
111*44704f69SBart Van Asschecan specify an installation prefix other than `/usr/local' by giving
112*44704f69SBart Van Assche`configure' the option `--prefix=PREFIX'.
113*44704f69SBart Van Assche
114*44704f69SBart Van Assche   You can specify separate installation prefixes for
115*44704f69SBart Van Asschearchitecture-specific files and architecture-independent files.  If you
116*44704f69SBart Van Asschepass the option `--exec-prefix=PREFIX' to `configure', the package uses
117*44704f69SBart Van AsschePREFIX as the prefix for installing programs and libraries.
118*44704f69SBart Van AsscheDocumentation and other data files still use the regular prefix.
119*44704f69SBart Van Assche
120*44704f69SBart Van Assche   In addition, if you use an unusual directory layout you can give
121*44704f69SBart Van Asscheoptions like `--bindir=DIR' to specify different values for particular
122*44704f69SBart Van Asschekinds of files.  Run `configure --help' for a list of the directories
123*44704f69SBart Van Asscheyou can set and what kinds of files go in them.
124*44704f69SBart Van Assche
125*44704f69SBart Van Assche   If the package supports it, you can cause programs to be installed
126*44704f69SBart Van Asschewith an extra prefix or suffix on their names by giving `configure' the
127*44704f69SBart Van Asscheoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
128*44704f69SBart Van Assche
129*44704f69SBart Van AsscheOptional Features
130*44704f69SBart Van Assche=================
131*44704f69SBart Van Assche
132*44704f69SBart Van AsscheSome packages pay attention to `--enable-FEATURE' options to
133*44704f69SBart Van Assche`configure', where FEATURE indicates an optional part of the package.
134*44704f69SBart Van AsscheThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
135*44704f69SBart Van Asscheis something like `gnu-as' or `x' (for the X Window System).  The
136*44704f69SBart Van Assche`README' should mention any `--enable-' and `--with-' options that the
137*44704f69SBart Van Asschepackage recognizes.
138*44704f69SBart Van Assche
139*44704f69SBart Van Assche   For packages that use the X Window System, `configure' can usually
140*44704f69SBart Van Asschefind the X include and library files automatically, but if it doesn't,
141*44704f69SBart Van Asscheyou can use the `configure' options `--x-includes=DIR' and
142*44704f69SBart Van Assche`--x-libraries=DIR' to specify their locations.
143*44704f69SBart Van Assche
144*44704f69SBart Van AsscheSpecifying the System Type
145*44704f69SBart Van Assche==========================
146*44704f69SBart Van Assche
147*44704f69SBart Van AsscheThere may be some features `configure' cannot figure out automatically,
148*44704f69SBart Van Asschebut needs to determine by the type of machine the package will run on.
149*44704f69SBart Van AsscheUsually, assuming the package is built to be run on the _same_
150*44704f69SBart Van Asschearchitectures, `configure' can figure that out, but if it prints a
151*44704f69SBart Van Asschemessage saying it cannot guess the machine type, give it the
152*44704f69SBart Van Assche`--build=TYPE' option.  TYPE can either be a short name for the system
153*44704f69SBart Van Asschetype, such as `sun4', or a canonical name which has the form:
154*44704f69SBart Van Assche
155*44704f69SBart Van Assche     CPU-COMPANY-SYSTEM
156*44704f69SBart Van Assche
157*44704f69SBart Van Asschewhere SYSTEM can have one of these forms:
158*44704f69SBart Van Assche
159*44704f69SBart Van Assche     OS KERNEL-OS
160*44704f69SBart Van Assche
161*44704f69SBart Van Assche   See the file `config.sub' for the possible values of each field.  If
162*44704f69SBart Van Assche`config.sub' isn't included in this package, then this package doesn't
163*44704f69SBart Van Asscheneed to know the machine type.
164*44704f69SBart Van Assche
165*44704f69SBart Van Assche   If you are _building_ compiler tools for cross-compiling, you should
166*44704f69SBart Van Asscheuse the option `--target=TYPE' to select the type of system they will
167*44704f69SBart Van Asscheproduce code for.
168*44704f69SBart Van Assche
169*44704f69SBart Van Assche   If you want to _use_ a cross compiler, that generates code for a
170*44704f69SBart Van Asscheplatform different from the build platform, you should specify the
171*44704f69SBart Van Assche"host" platform (i.e., that on which the generated programs will
172*44704f69SBart Van Asscheeventually be run) with `--host=TYPE'.
173*44704f69SBart Van Assche
174*44704f69SBart Van AsscheSharing Defaults
175*44704f69SBart Van Assche================
176*44704f69SBart Van Assche
177*44704f69SBart Van AsscheIf you want to set default values for `configure' scripts to share, you
178*44704f69SBart Van Asschecan create a site shell script called `config.site' that gives default
179*44704f69SBart Van Asschevalues for variables like `CC', `cache_file', and `prefix'.
180*44704f69SBart Van Assche`configure' looks for `PREFIX/share/config.site' if it exists, then
181*44704f69SBart Van Assche`PREFIX/etc/config.site' if it exists.  Or, you can set the
182*44704f69SBart Van Assche`CONFIG_SITE' environment variable to the location of the site script.
183*44704f69SBart Van AsscheA warning: not all `configure' scripts look for a site script.
184*44704f69SBart Van Assche
185*44704f69SBart Van AsscheDefining Variables
186*44704f69SBart Van Assche==================
187*44704f69SBart Van Assche
188*44704f69SBart Van AsscheVariables not defined in a site shell script can be set in the
189*44704f69SBart Van Asscheenvironment passed to `configure'.  However, some packages may run
190*44704f69SBart Van Asscheconfigure again during the build, and the customized values of these
191*44704f69SBart Van Asschevariables may be lost.  In order to avoid this problem, you should set
192*44704f69SBart Van Asschethem in the `configure' command line, using `VAR=value'.  For example:
193*44704f69SBart Van Assche
194*44704f69SBart Van Assche     ./configure CC=/usr/local2/bin/gcc
195*44704f69SBart Van Assche
196*44704f69SBart Van Asschecauses the specified `gcc' to be used as the C compiler (unless it is
197*44704f69SBart Van Asscheoverridden in the site shell script).
198*44704f69SBart Van Assche
199*44704f69SBart Van AsscheUnfortunately, this technique does not work for `CONFIG_SHELL' due to
200*44704f69SBart Van Asschean Autoconf bug.  Until the bug is fixed you can use this workaround:
201*44704f69SBart Van Assche
202*44704f69SBart Van Assche     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
203*44704f69SBart Van Assche
204*44704f69SBart Van Assche`configure' Invocation
205*44704f69SBart Van Assche======================
206*44704f69SBart Van Assche
207*44704f69SBart Van Assche`configure' recognizes the following options to control how it operates.
208*44704f69SBart Van Assche
209*44704f69SBart Van Assche`--help'
210*44704f69SBart Van Assche`-h'
211*44704f69SBart Van Assche     Print a summary of the options to `configure', and exit.
212*44704f69SBart Van Assche
213*44704f69SBart Van Assche`--version'
214*44704f69SBart Van Assche`-V'
215*44704f69SBart Van Assche     Print the version of Autoconf used to generate the `configure'
216*44704f69SBart Van Assche     script, and exit.
217*44704f69SBart Van Assche
218*44704f69SBart Van Assche`--cache-file=FILE'
219*44704f69SBart Van Assche     Enable the cache: use and save the results of the tests in FILE,
220*44704f69SBart Van Assche     traditionally `config.cache'.  FILE defaults to `/dev/null' to
221*44704f69SBart Van Assche     disable caching.
222*44704f69SBart Van Assche
223*44704f69SBart Van Assche`--config-cache'
224*44704f69SBart Van Assche`-C'
225*44704f69SBart Van Assche     Alias for `--cache-file=config.cache'.
226*44704f69SBart Van Assche
227*44704f69SBart Van Assche`--quiet'
228*44704f69SBart Van Assche`--silent'
229*44704f69SBart Van Assche`-q'
230*44704f69SBart Van Assche     Do not print messages saying which checks are being made.  To
231*44704f69SBart Van Assche     suppress all normal output, redirect it to `/dev/null' (any error
232*44704f69SBart Van Assche     messages will still be shown).
233*44704f69SBart Van Assche
234*44704f69SBart Van Assche`--srcdir=DIR'
235*44704f69SBart Van Assche     Look for the package's source code in directory DIR.  Usually
236*44704f69SBart Van Assche     `configure' can determine that directory automatically.
237*44704f69SBart Van Assche
238*44704f69SBart Van Assche`configure' also accepts some other, not widely useful, options.  Run
239*44704f69SBart Van Assche`configure --help' for more details.
240*44704f69SBart Van Assche
241