1189777a2SCristian PallaresInstallation Instructions 2189777a2SCristian Pallares************************* 3189777a2SCristian Pallares 4*1f13f311SSkyrpexCopyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, 5*1f13f311SSkyrpexInc. 6189777a2SCristian Pallares 7189777a2SCristian Pallares Copying and distribution of this file, with or without modification, 8189777a2SCristian Pallaresare permitted in any medium without royalty provided the copyright 9189777a2SCristian Pallaresnotice and this notice are preserved. This file is offered as-is, 10189777a2SCristian Pallareswithout warranty of any kind. 11189777a2SCristian Pallares 12189777a2SCristian PallaresBasic Installation 13189777a2SCristian Pallares================== 14189777a2SCristian Pallares 15*1f13f311SSkyrpex Briefly, the shell command `./configure && make && make install' 16*1f13f311SSkyrpexshould configure, build, and install this package. The following 17189777a2SCristian Pallaresmore-detailed instructions are generic; see the `README' file for 18189777a2SCristian Pallaresinstructions specific to this package. Some packages provide this 19189777a2SCristian Pallares`INSTALL' file but do not implement all of the features documented 20189777a2SCristian Pallaresbelow. The lack of an optional feature in a given package is not 21189777a2SCristian Pallaresnecessarily a bug. More recommendations for GNU packages can be found 22189777a2SCristian Pallaresin *note Makefile Conventions: (standards)Makefile Conventions. 23189777a2SCristian Pallares 24189777a2SCristian Pallares The `configure' shell script attempts to guess correct values for 25189777a2SCristian Pallaresvarious system-dependent variables used during compilation. It uses 26189777a2SCristian Pallaresthose values to create a `Makefile' in each directory of the package. 27189777a2SCristian PallaresIt may also create one or more `.h' files containing system-dependent 28189777a2SCristian Pallaresdefinitions. Finally, it creates a shell script `config.status' that 29189777a2SCristian Pallaresyou can run in the future to recreate the current configuration, and a 30189777a2SCristian Pallaresfile `config.log' containing compiler output (useful mainly for 31189777a2SCristian Pallaresdebugging `configure'). 32189777a2SCristian Pallares 33189777a2SCristian Pallares It can also use an optional file (typically called `config.cache' 34189777a2SCristian Pallaresand enabled with `--cache-file=config.cache' or simply `-C') that saves 35189777a2SCristian Pallaresthe results of its tests to speed up reconfiguring. Caching is 36189777a2SCristian Pallaresdisabled by default to prevent problems with accidental use of stale 37189777a2SCristian Pallarescache files. 38189777a2SCristian Pallares 39189777a2SCristian Pallares If you need to do unusual things to compile the package, please try 40189777a2SCristian Pallaresto figure out how `configure' could check whether to do them, and mail 41189777a2SCristian Pallaresdiffs or instructions to the address given in the `README' so they can 42189777a2SCristian Pallaresbe considered for the next release. If you are using the cache, and at 43189777a2SCristian Pallaressome point `config.cache' contains results you don't want to keep, you 44189777a2SCristian Pallaresmay remove or edit it. 45189777a2SCristian Pallares 46189777a2SCristian Pallares The file `configure.ac' (or `configure.in') is used to create 47189777a2SCristian Pallares`configure' by a program called `autoconf'. You need `configure.ac' if 48189777a2SCristian Pallaresyou want to change it or regenerate `configure' using a newer version 49189777a2SCristian Pallaresof `autoconf'. 50189777a2SCristian Pallares 51189777a2SCristian Pallares The simplest way to compile this package is: 52189777a2SCristian Pallares 53189777a2SCristian Pallares 1. `cd' to the directory containing the package's source code and type 54189777a2SCristian Pallares `./configure' to configure the package for your system. 55189777a2SCristian Pallares 56189777a2SCristian Pallares Running `configure' might take a while. While running, it prints 57189777a2SCristian Pallares some messages telling which features it is checking for. 58189777a2SCristian Pallares 59189777a2SCristian Pallares 2. Type `make' to compile the package. 60189777a2SCristian Pallares 61189777a2SCristian Pallares 3. Optionally, type `make check' to run any self-tests that come with 62189777a2SCristian Pallares the package, generally using the just-built uninstalled binaries. 63189777a2SCristian Pallares 64189777a2SCristian Pallares 4. Type `make install' to install the programs and any data files and 65189777a2SCristian Pallares documentation. When installing into a prefix owned by root, it is 66189777a2SCristian Pallares recommended that the package be configured and built as a regular 67189777a2SCristian Pallares user, and only the `make install' phase executed with root 68189777a2SCristian Pallares privileges. 69189777a2SCristian Pallares 70189777a2SCristian Pallares 5. Optionally, type `make installcheck' to repeat any self-tests, but 71189777a2SCristian Pallares this time using the binaries in their final installed location. 72189777a2SCristian Pallares This target does not install anything. Running this target as a 73189777a2SCristian Pallares regular user, particularly if the prior `make install' required 74189777a2SCristian Pallares root privileges, verifies that the installation completed 75189777a2SCristian Pallares correctly. 76189777a2SCristian Pallares 77189777a2SCristian Pallares 6. You can remove the program binaries and object files from the 78189777a2SCristian Pallares source code directory by typing `make clean'. To also remove the 79189777a2SCristian Pallares files that `configure' created (so you can compile the package for 80189777a2SCristian Pallares a different kind of computer), type `make distclean'. There is 81189777a2SCristian Pallares also a `make maintainer-clean' target, but that is intended mainly 82189777a2SCristian Pallares for the package's developers. If you use it, you may have to get 83189777a2SCristian Pallares all sorts of other programs in order to regenerate files that came 84189777a2SCristian Pallares with the distribution. 85189777a2SCristian Pallares 86189777a2SCristian Pallares 7. Often, you can also type `make uninstall' to remove the installed 87189777a2SCristian Pallares files again. In practice, not all packages have tested that 88189777a2SCristian Pallares uninstallation works correctly, even though it is required by the 89189777a2SCristian Pallares GNU Coding Standards. 90189777a2SCristian Pallares 91189777a2SCristian Pallares 8. Some packages, particularly those that use Automake, provide `make 92189777a2SCristian Pallares distcheck', which can by used by developers to test that all other 93189777a2SCristian Pallares targets like `make install' and `make uninstall' work correctly. 94189777a2SCristian Pallares This target is generally not run by end users. 95189777a2SCristian Pallares 96189777a2SCristian PallaresCompilers and Options 97189777a2SCristian Pallares===================== 98189777a2SCristian Pallares 99189777a2SCristian Pallares Some systems require unusual options for compilation or linking that 100189777a2SCristian Pallaresthe `configure' script does not know about. Run `./configure --help' 101189777a2SCristian Pallaresfor details on some of the pertinent environment variables. 102189777a2SCristian Pallares 103189777a2SCristian Pallares You can give `configure' initial values for configuration parameters 104189777a2SCristian Pallaresby setting variables in the command line or in the environment. Here 105189777a2SCristian Pallaresis an example: 106189777a2SCristian Pallares 107189777a2SCristian Pallares ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108189777a2SCristian Pallares 109189777a2SCristian Pallares *Note Defining Variables::, for more details. 110189777a2SCristian Pallares 111189777a2SCristian PallaresCompiling For Multiple Architectures 112189777a2SCristian Pallares==================================== 113189777a2SCristian Pallares 114189777a2SCristian Pallares You can compile the package for more than one kind of computer at the 115189777a2SCristian Pallaressame time, by placing the object files for each architecture in their 116189777a2SCristian Pallaresown directory. To do this, you can use GNU `make'. `cd' to the 117189777a2SCristian Pallaresdirectory where you want the object files and executables to go and run 118189777a2SCristian Pallaresthe `configure' script. `configure' automatically checks for the 119189777a2SCristian Pallaressource code in the directory that `configure' is in and in `..'. This 120189777a2SCristian Pallaresis known as a "VPATH" build. 121189777a2SCristian Pallares 122189777a2SCristian Pallares With a non-GNU `make', it is safer to compile the package for one 123189777a2SCristian Pallaresarchitecture at a time in the source code directory. After you have 124189777a2SCristian Pallaresinstalled the package for one architecture, use `make distclean' before 125189777a2SCristian Pallaresreconfiguring for another architecture. 126189777a2SCristian Pallares 127189777a2SCristian Pallares On MacOS X 10.5 and later systems, you can create libraries and 128189777a2SCristian Pallaresexecutables that work on multiple system types--known as "fat" or 129189777a2SCristian Pallares"universal" binaries--by specifying multiple `-arch' options to the 130189777a2SCristian Pallarescompiler but only a single `-arch' option to the preprocessor. Like 131189777a2SCristian Pallaresthis: 132189777a2SCristian Pallares 133189777a2SCristian Pallares ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134189777a2SCristian Pallares CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135189777a2SCristian Pallares CPP="gcc -E" CXXCPP="g++ -E" 136189777a2SCristian Pallares 137189777a2SCristian Pallares This is not guaranteed to produce working output in all cases, you 138189777a2SCristian Pallaresmay have to build one architecture at a time and combine the results 139189777a2SCristian Pallaresusing the `lipo' tool if you have problems. 140189777a2SCristian Pallares 141189777a2SCristian PallaresInstallation Names 142189777a2SCristian Pallares================== 143189777a2SCristian Pallares 144189777a2SCristian Pallares By default, `make install' installs the package's commands under 145189777a2SCristian Pallares`/usr/local/bin', include files under `/usr/local/include', etc. You 146189777a2SCristian Pallarescan specify an installation prefix other than `/usr/local' by giving 147189777a2SCristian Pallares`configure' the option `--prefix=PREFIX', where PREFIX must be an 148189777a2SCristian Pallaresabsolute file name. 149189777a2SCristian Pallares 150189777a2SCristian Pallares You can specify separate installation prefixes for 151189777a2SCristian Pallaresarchitecture-specific files and architecture-independent files. If you 152189777a2SCristian Pallarespass the option `--exec-prefix=PREFIX' to `configure', the package uses 153189777a2SCristian PallaresPREFIX as the prefix for installing programs and libraries. 154189777a2SCristian PallaresDocumentation and other data files still use the regular prefix. 155189777a2SCristian Pallares 156189777a2SCristian Pallares In addition, if you use an unusual directory layout you can give 157189777a2SCristian Pallaresoptions like `--bindir=DIR' to specify different values for particular 158189777a2SCristian Pallareskinds of files. Run `configure --help' for a list of the directories 159189777a2SCristian Pallaresyou can set and what kinds of files go in them. In general, the 160189777a2SCristian Pallaresdefault for these options is expressed in terms of `${prefix}', so that 161189777a2SCristian Pallaresspecifying just `--prefix' will affect all of the other directory 162189777a2SCristian Pallaresspecifications that were not explicitly provided. 163189777a2SCristian Pallares 164189777a2SCristian Pallares The most portable way to affect installation locations is to pass the 165189777a2SCristian Pallarescorrect locations to `configure'; however, many packages provide one or 166189777a2SCristian Pallaresboth of the following shortcuts of passing variable assignments to the 167189777a2SCristian Pallares`make install' command line to change installation locations without 168189777a2SCristian Pallareshaving to reconfigure or recompile. 169189777a2SCristian Pallares 170189777a2SCristian Pallares The first method involves providing an override variable for each 171189777a2SCristian Pallaresaffected directory. For example, `make install 172189777a2SCristian Pallaresprefix=/alternate/directory' will choose an alternate location for all 173189777a2SCristian Pallaresdirectory configuration variables that were expressed in terms of 174189777a2SCristian Pallares`${prefix}'. Any directories that were specified during `configure', 175189777a2SCristian Pallaresbut not in terms of `${prefix}', must each be overridden at install 176189777a2SCristian Pallarestime for the entire installation to be relocated. The approach of 177189777a2SCristian Pallaresmakefile variable overrides for each directory variable is required by 178189777a2SCristian Pallaresthe GNU Coding Standards, and ideally causes no recompilation. 179189777a2SCristian PallaresHowever, some platforms have known limitations with the semantics of 180189777a2SCristian Pallaresshared libraries that end up requiring recompilation when using this 181189777a2SCristian Pallaresmethod, particularly noticeable in packages that use GNU Libtool. 182189777a2SCristian Pallares 183189777a2SCristian Pallares The second method involves providing the `DESTDIR' variable. For 184189777a2SCristian Pallaresexample, `make install DESTDIR=/alternate/directory' will prepend 185189777a2SCristian Pallares`/alternate/directory' before all installation names. The approach of 186189777a2SCristian Pallares`DESTDIR' overrides is not required by the GNU Coding Standards, and 187189777a2SCristian Pallaresdoes not work on platforms that have drive letters. On the other hand, 188189777a2SCristian Pallaresit does better at avoiding recompilation issues, and works well even 189189777a2SCristian Pallareswhen some directory options were not specified in terms of `${prefix}' 190189777a2SCristian Pallaresat `configure' time. 191189777a2SCristian Pallares 192189777a2SCristian PallaresOptional Features 193189777a2SCristian Pallares================= 194189777a2SCristian Pallares 195189777a2SCristian Pallares If the package supports it, you can cause programs to be installed 196189777a2SCristian Pallareswith an extra prefix or suffix on their names by giving `configure' the 197189777a2SCristian Pallaresoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198189777a2SCristian Pallares 199189777a2SCristian Pallares Some packages pay attention to `--enable-FEATURE' options to 200189777a2SCristian Pallares`configure', where FEATURE indicates an optional part of the package. 201189777a2SCristian PallaresThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202189777a2SCristian Pallaresis something like `gnu-as' or `x' (for the X Window System). The 203189777a2SCristian Pallares`README' should mention any `--enable-' and `--with-' options that the 204189777a2SCristian Pallarespackage recognizes. 205189777a2SCristian Pallares 206189777a2SCristian Pallares For packages that use the X Window System, `configure' can usually 207189777a2SCristian Pallaresfind the X include and library files automatically, but if it doesn't, 208189777a2SCristian Pallaresyou can use the `configure' options `--x-includes=DIR' and 209189777a2SCristian Pallares`--x-libraries=DIR' to specify their locations. 210189777a2SCristian Pallares 211189777a2SCristian Pallares Some packages offer the ability to configure how verbose the 212189777a2SCristian Pallaresexecution of `make' will be. For these packages, running `./configure 213189777a2SCristian Pallares--enable-silent-rules' sets the default to minimal output, which can be 214189777a2SCristian Pallaresoverridden with `make V=1'; while running `./configure 215189777a2SCristian Pallares--disable-silent-rules' sets the default to verbose, which can be 216189777a2SCristian Pallaresoverridden with `make V=0'. 217189777a2SCristian Pallares 218189777a2SCristian PallaresParticular systems 219189777a2SCristian Pallares================== 220189777a2SCristian Pallares 221189777a2SCristian Pallares On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222189777a2SCristian PallaresCC is not installed, it is recommended to use the following options in 223189777a2SCristian Pallaresorder to use an ANSI C compiler: 224189777a2SCristian Pallares 225189777a2SCristian Pallares ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226189777a2SCristian Pallares 227189777a2SCristian Pallaresand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228189777a2SCristian Pallares 229*1f13f311SSkyrpex HP-UX `make' updates targets which have the same time stamps as 230*1f13f311SSkyrpextheir prerequisites, which makes it generally unusable when shipped 231*1f13f311SSkyrpexgenerated files such as `configure' are involved. Use GNU `make' 232*1f13f311SSkyrpexinstead. 233*1f13f311SSkyrpex 234189777a2SCristian Pallares On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235189777a2SCristian Pallaresparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236189777a2SCristian Pallaresa workaround. If GNU CC is not installed, it is therefore recommended 237189777a2SCristian Pallaresto try 238189777a2SCristian Pallares 239189777a2SCristian Pallares ./configure CC="cc" 240189777a2SCristian Pallares 241189777a2SCristian Pallaresand if that doesn't work, try 242189777a2SCristian Pallares 243189777a2SCristian Pallares ./configure CC="cc -nodtk" 244189777a2SCristian Pallares 245189777a2SCristian Pallares On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246189777a2SCristian Pallaresdirectory contains several dysfunctional programs; working variants of 247189777a2SCristian Pallaresthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248189777a2SCristian Pallaresin your `PATH', put it _after_ `/usr/bin'. 249189777a2SCristian Pallares 250189777a2SCristian Pallares On Haiku, software installed for all users goes in `/boot/common', 251189777a2SCristian Pallaresnot `/usr/local'. It is recommended to use the following options: 252189777a2SCristian Pallares 253189777a2SCristian Pallares ./configure --prefix=/boot/common 254189777a2SCristian Pallares 255189777a2SCristian PallaresSpecifying the System Type 256189777a2SCristian Pallares========================== 257189777a2SCristian Pallares 258189777a2SCristian Pallares There may be some features `configure' cannot figure out 259189777a2SCristian Pallaresautomatically, but needs to determine by the type of machine the package 260189777a2SCristian Pallareswill run on. Usually, assuming the package is built to be run on the 261189777a2SCristian Pallares_same_ architectures, `configure' can figure that out, but if it prints 262189777a2SCristian Pallaresa message saying it cannot guess the machine type, give it the 263189777a2SCristian Pallares`--build=TYPE' option. TYPE can either be a short name for the system 264189777a2SCristian Pallarestype, such as `sun4', or a canonical name which has the form: 265189777a2SCristian Pallares 266189777a2SCristian Pallares CPU-COMPANY-SYSTEM 267189777a2SCristian Pallares 268189777a2SCristian Pallareswhere SYSTEM can have one of these forms: 269189777a2SCristian Pallares 270189777a2SCristian Pallares OS 271189777a2SCristian Pallares KERNEL-OS 272189777a2SCristian Pallares 273189777a2SCristian Pallares See the file `config.sub' for the possible values of each field. If 274189777a2SCristian Pallares`config.sub' isn't included in this package, then this package doesn't 275189777a2SCristian Pallaresneed to know the machine type. 276189777a2SCristian Pallares 277189777a2SCristian Pallares If you are _building_ compiler tools for cross-compiling, you should 278189777a2SCristian Pallaresuse the option `--target=TYPE' to select the type of system they will 279189777a2SCristian Pallaresproduce code for. 280189777a2SCristian Pallares 281189777a2SCristian Pallares If you want to _use_ a cross compiler, that generates code for a 282189777a2SCristian Pallaresplatform different from the build platform, you should specify the 283189777a2SCristian Pallares"host" platform (i.e., that on which the generated programs will 284189777a2SCristian Pallareseventually be run) with `--host=TYPE'. 285189777a2SCristian Pallares 286189777a2SCristian PallaresSharing Defaults 287189777a2SCristian Pallares================ 288189777a2SCristian Pallares 289189777a2SCristian Pallares If you want to set default values for `configure' scripts to share, 290189777a2SCristian Pallaresyou can create a site shell script called `config.site' that gives 291189777a2SCristian Pallaresdefault values for variables like `CC', `cache_file', and `prefix'. 292189777a2SCristian Pallares`configure' looks for `PREFIX/share/config.site' if it exists, then 293189777a2SCristian Pallares`PREFIX/etc/config.site' if it exists. Or, you can set the 294189777a2SCristian Pallares`CONFIG_SITE' environment variable to the location of the site script. 295189777a2SCristian PallaresA warning: not all `configure' scripts look for a site script. 296189777a2SCristian Pallares 297189777a2SCristian PallaresDefining Variables 298189777a2SCristian Pallares================== 299189777a2SCristian Pallares 300189777a2SCristian Pallares Variables not defined in a site shell script can be set in the 301189777a2SCristian Pallaresenvironment passed to `configure'. However, some packages may run 302189777a2SCristian Pallaresconfigure again during the build, and the customized values of these 303189777a2SCristian Pallaresvariables may be lost. In order to avoid this problem, you should set 304189777a2SCristian Pallaresthem in the `configure' command line, using `VAR=value'. For example: 305189777a2SCristian Pallares 306189777a2SCristian Pallares ./configure CC=/usr/local2/bin/gcc 307189777a2SCristian Pallares 308189777a2SCristian Pallarescauses the specified `gcc' to be used as the C compiler (unless it is 309189777a2SCristian Pallaresoverridden in the site shell script). 310189777a2SCristian Pallares 311189777a2SCristian PallaresUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312*1f13f311SSkyrpexan Autoconf limitation. Until the limitation is lifted, you can use 313*1f13f311SSkyrpexthis workaround: 314189777a2SCristian Pallares 315*1f13f311SSkyrpex CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 316189777a2SCristian Pallares 317189777a2SCristian Pallares`configure' Invocation 318189777a2SCristian Pallares====================== 319189777a2SCristian Pallares 320189777a2SCristian Pallares `configure' recognizes the following options to control how it 321189777a2SCristian Pallaresoperates. 322189777a2SCristian Pallares 323189777a2SCristian Pallares`--help' 324189777a2SCristian Pallares`-h' 325189777a2SCristian Pallares Print a summary of all of the options to `configure', and exit. 326189777a2SCristian Pallares 327189777a2SCristian Pallares`--help=short' 328189777a2SCristian Pallares`--help=recursive' 329189777a2SCristian Pallares Print a summary of the options unique to this package's 330189777a2SCristian Pallares `configure', and exit. The `short' variant lists options used 331189777a2SCristian Pallares only in the top level, while the `recursive' variant lists options 332189777a2SCristian Pallares also present in any nested packages. 333189777a2SCristian Pallares 334189777a2SCristian Pallares`--version' 335189777a2SCristian Pallares`-V' 336189777a2SCristian Pallares Print the version of Autoconf used to generate the `configure' 337189777a2SCristian Pallares script, and exit. 338189777a2SCristian Pallares 339189777a2SCristian Pallares`--cache-file=FILE' 340189777a2SCristian Pallares Enable the cache: use and save the results of the tests in FILE, 341189777a2SCristian Pallares traditionally `config.cache'. FILE defaults to `/dev/null' to 342189777a2SCristian Pallares disable caching. 343189777a2SCristian Pallares 344189777a2SCristian Pallares`--config-cache' 345189777a2SCristian Pallares`-C' 346189777a2SCristian Pallares Alias for `--cache-file=config.cache'. 347189777a2SCristian Pallares 348189777a2SCristian Pallares`--quiet' 349189777a2SCristian Pallares`--silent' 350189777a2SCristian Pallares`-q' 351189777a2SCristian Pallares Do not print messages saying which checks are being made. To 352189777a2SCristian Pallares suppress all normal output, redirect it to `/dev/null' (any error 353189777a2SCristian Pallares messages will still be shown). 354189777a2SCristian Pallares 355189777a2SCristian Pallares`--srcdir=DIR' 356189777a2SCristian Pallares Look for the package's source code in directory DIR. Usually 357189777a2SCristian Pallares `configure' can determine that directory automatically. 358189777a2SCristian Pallares 359189777a2SCristian Pallares`--prefix=DIR' 360189777a2SCristian Pallares Use DIR as the installation prefix. *note Installation Names:: 361189777a2SCristian Pallares for more details, including other options available for fine-tuning 362189777a2SCristian Pallares the installation locations. 363189777a2SCristian Pallares 364189777a2SCristian Pallares`--no-create' 365189777a2SCristian Pallares`-n' 366189777a2SCristian Pallares Run the configure checks, but stop before creating any output 367189777a2SCristian Pallares files. 368189777a2SCristian Pallares 369189777a2SCristian Pallares`configure' also accepts some other, not widely useful, options. Run 370189777a2SCristian Pallares`configure --help' for more details. 371