INSTALL revision f3dfa9d3
1f8a31ee4SmrgInstallation Instructions 2f8a31ee4Smrg************************* 3f8a31ee4Smrg 4f3dfa9d3SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5f3dfa9d3SmrgInc. 6f8a31ee4Smrg 7f3dfa9d3Smrg Copying and distribution of this file, with or without modification, 8f3dfa9d3Smrgare permitted in any medium without royalty provided the copyright 9f3dfa9d3Smrgnotice and this notice are preserved. This file is offered as-is, 10f3dfa9d3Smrgwithout warranty of any kind. 11f8a31ee4Smrg 12f8a31ee4SmrgBasic Installation 13f8a31ee4Smrg================== 14f8a31ee4Smrg 15f8a31ee4Smrg Briefly, the shell commands `./configure; make; make install' should 16f8a31ee4Smrgconfigure, build, and install this package. The following 17f8a31ee4Smrgmore-detailed instructions are generic; see the `README' file for 18f3dfa9d3Smrginstructions specific to this package. Some packages provide this 19f3dfa9d3Smrg`INSTALL' file but do not implement all of the features documented 20f3dfa9d3Smrgbelow. The lack of an optional feature in a given package is not 21f3dfa9d3Smrgnecessarily a bug. More recommendations for GNU packages can be found 22f3dfa9d3Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23f8a31ee4Smrg 24f8a31ee4Smrg The `configure' shell script attempts to guess correct values for 25f8a31ee4Smrgvarious system-dependent variables used during compilation. It uses 26f8a31ee4Smrgthose values to create a `Makefile' in each directory of the package. 27f8a31ee4SmrgIt may also create one or more `.h' files containing system-dependent 28f8a31ee4Smrgdefinitions. Finally, it creates a shell script `config.status' that 29f8a31ee4Smrgyou can run in the future to recreate the current configuration, and a 30f8a31ee4Smrgfile `config.log' containing compiler output (useful mainly for 31f8a31ee4Smrgdebugging `configure'). 32f8a31ee4Smrg 33f8a31ee4Smrg It can also use an optional file (typically called `config.cache' 34f8a31ee4Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35f8a31ee4Smrgthe results of its tests to speed up reconfiguring. Caching is 36f8a31ee4Smrgdisabled by default to prevent problems with accidental use of stale 37f8a31ee4Smrgcache files. 38f8a31ee4Smrg 39f8a31ee4Smrg If you need to do unusual things to compile the package, please try 40f8a31ee4Smrgto figure out how `configure' could check whether to do them, and mail 41f8a31ee4Smrgdiffs or instructions to the address given in the `README' so they can 42f8a31ee4Smrgbe considered for the next release. If you are using the cache, and at 43f8a31ee4Smrgsome point `config.cache' contains results you don't want to keep, you 44f8a31ee4Smrgmay remove or edit it. 45f8a31ee4Smrg 46f8a31ee4Smrg The file `configure.ac' (or `configure.in') is used to create 47f8a31ee4Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48f8a31ee4Smrgyou want to change it or regenerate `configure' using a newer version 49f8a31ee4Smrgof `autoconf'. 50f8a31ee4Smrg 51f3dfa9d3Smrg The simplest way to compile this package is: 52f8a31ee4Smrg 53f8a31ee4Smrg 1. `cd' to the directory containing the package's source code and type 54f8a31ee4Smrg `./configure' to configure the package for your system. 55f8a31ee4Smrg 56f8a31ee4Smrg Running `configure' might take a while. While running, it prints 57f8a31ee4Smrg some messages telling which features it is checking for. 58f8a31ee4Smrg 59f8a31ee4Smrg 2. Type `make' to compile the package. 60f8a31ee4Smrg 61f8a31ee4Smrg 3. Optionally, type `make check' to run any self-tests that come with 62f3dfa9d3Smrg the package, generally using the just-built uninstalled binaries. 63f8a31ee4Smrg 64f8a31ee4Smrg 4. Type `make install' to install the programs and any data files and 65f3dfa9d3Smrg documentation. When installing into a prefix owned by root, it is 66f3dfa9d3Smrg recommended that the package be configured and built as a regular 67f3dfa9d3Smrg user, and only the `make install' phase executed with root 68f3dfa9d3Smrg privileges. 69f3dfa9d3Smrg 70f3dfa9d3Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71f3dfa9d3Smrg this time using the binaries in their final installed location. 72f3dfa9d3Smrg This target does not install anything. Running this target as a 73f3dfa9d3Smrg regular user, particularly if the prior `make install' required 74f3dfa9d3Smrg root privileges, verifies that the installation completed 75f3dfa9d3Smrg correctly. 76f3dfa9d3Smrg 77f3dfa9d3Smrg 6. You can remove the program binaries and object files from the 78f8a31ee4Smrg source code directory by typing `make clean'. To also remove the 79f8a31ee4Smrg files that `configure' created (so you can compile the package for 80f8a31ee4Smrg a different kind of computer), type `make distclean'. There is 81f8a31ee4Smrg also a `make maintainer-clean' target, but that is intended mainly 82f8a31ee4Smrg for the package's developers. If you use it, you may have to get 83f8a31ee4Smrg all sorts of other programs in order to regenerate files that came 84f8a31ee4Smrg with the distribution. 85f8a31ee4Smrg 86f3dfa9d3Smrg 7. Often, you can also type `make uninstall' to remove the installed 87f3dfa9d3Smrg files again. In practice, not all packages have tested that 88f3dfa9d3Smrg uninstallation works correctly, even though it is required by the 89f3dfa9d3Smrg GNU Coding Standards. 90f3dfa9d3Smrg 91f3dfa9d3Smrg 8. Some packages, particularly those that use Automake, provide `make 92f3dfa9d3Smrg distcheck', which can by used by developers to test that all other 93f3dfa9d3Smrg targets like `make install' and `make uninstall' work correctly. 94f3dfa9d3Smrg This target is generally not run by end users. 95f8a31ee4Smrg 96f8a31ee4SmrgCompilers and Options 97f8a31ee4Smrg===================== 98f8a31ee4Smrg 99f8a31ee4Smrg Some systems require unusual options for compilation or linking that 100f8a31ee4Smrgthe `configure' script does not know about. Run `./configure --help' 101f8a31ee4Smrgfor details on some of the pertinent environment variables. 102f8a31ee4Smrg 103f8a31ee4Smrg You can give `configure' initial values for configuration parameters 104f8a31ee4Smrgby setting variables in the command line or in the environment. Here 105f8a31ee4Smrgis an example: 106f8a31ee4Smrg 107f8a31ee4Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108f8a31ee4Smrg 109f8a31ee4Smrg *Note Defining Variables::, for more details. 110f8a31ee4Smrg 111f8a31ee4SmrgCompiling For Multiple Architectures 112f8a31ee4Smrg==================================== 113f8a31ee4Smrg 114f8a31ee4Smrg You can compile the package for more than one kind of computer at the 115f8a31ee4Smrgsame time, by placing the object files for each architecture in their 116f8a31ee4Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117f8a31ee4Smrgdirectory where you want the object files and executables to go and run 118f8a31ee4Smrgthe `configure' script. `configure' automatically checks for the 119f3dfa9d3Smrgsource code in the directory that `configure' is in and in `..'. This 120f3dfa9d3Smrgis known as a "VPATH" build. 121f8a31ee4Smrg 122f8a31ee4Smrg With a non-GNU `make', it is safer to compile the package for one 123f8a31ee4Smrgarchitecture at a time in the source code directory. After you have 124f8a31ee4Smrginstalled the package for one architecture, use `make distclean' before 125f8a31ee4Smrgreconfiguring for another architecture. 126f8a31ee4Smrg 127f8a31ee4Smrg On MacOS X 10.5 and later systems, you can create libraries and 128f8a31ee4Smrgexecutables that work on multiple system types--known as "fat" or 129f8a31ee4Smrg"universal" binaries--by specifying multiple `-arch' options to the 130f8a31ee4Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131f8a31ee4Smrgthis: 132f8a31ee4Smrg 133f8a31ee4Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134f8a31ee4Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135f8a31ee4Smrg CPP="gcc -E" CXXCPP="g++ -E" 136f8a31ee4Smrg 137f8a31ee4Smrg This is not guaranteed to produce working output in all cases, you 138f8a31ee4Smrgmay have to build one architecture at a time and combine the results 139f8a31ee4Smrgusing the `lipo' tool if you have problems. 140f8a31ee4Smrg 141f8a31ee4SmrgInstallation Names 142f8a31ee4Smrg================== 143f8a31ee4Smrg 144f8a31ee4Smrg By default, `make install' installs the package's commands under 145f8a31ee4Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146f8a31ee4Smrgcan specify an installation prefix other than `/usr/local' by giving 147f3dfa9d3Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148f3dfa9d3Smrgabsolute file name. 149f8a31ee4Smrg 150f8a31ee4Smrg You can specify separate installation prefixes for 151f8a31ee4Smrgarchitecture-specific files and architecture-independent files. If you 152f8a31ee4Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153f8a31ee4SmrgPREFIX as the prefix for installing programs and libraries. 154f8a31ee4SmrgDocumentation and other data files still use the regular prefix. 155f8a31ee4Smrg 156f8a31ee4Smrg In addition, if you use an unusual directory layout you can give 157f8a31ee4Smrgoptions like `--bindir=DIR' to specify different values for particular 158f8a31ee4Smrgkinds of files. Run `configure --help' for a list of the directories 159f3dfa9d3Smrgyou can set and what kinds of files go in them. In general, the 160f3dfa9d3Smrgdefault for these options is expressed in terms of `${prefix}', so that 161f3dfa9d3Smrgspecifying just `--prefix' will affect all of the other directory 162f3dfa9d3Smrgspecifications that were not explicitly provided. 163f3dfa9d3Smrg 164f3dfa9d3Smrg The most portable way to affect installation locations is to pass the 165f3dfa9d3Smrgcorrect locations to `configure'; however, many packages provide one or 166f3dfa9d3Smrgboth of the following shortcuts of passing variable assignments to the 167f3dfa9d3Smrg`make install' command line to change installation locations without 168f3dfa9d3Smrghaving to reconfigure or recompile. 169f3dfa9d3Smrg 170f3dfa9d3Smrg The first method involves providing an override variable for each 171f3dfa9d3Smrgaffected directory. For example, `make install 172f3dfa9d3Smrgprefix=/alternate/directory' will choose an alternate location for all 173f3dfa9d3Smrgdirectory configuration variables that were expressed in terms of 174f3dfa9d3Smrg`${prefix}'. Any directories that were specified during `configure', 175f3dfa9d3Smrgbut not in terms of `${prefix}', must each be overridden at install 176f3dfa9d3Smrgtime for the entire installation to be relocated. The approach of 177f3dfa9d3Smrgmakefile variable overrides for each directory variable is required by 178f3dfa9d3Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179f3dfa9d3SmrgHowever, some platforms have known limitations with the semantics of 180f3dfa9d3Smrgshared libraries that end up requiring recompilation when using this 181f3dfa9d3Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182f3dfa9d3Smrg 183f3dfa9d3Smrg The second method involves providing the `DESTDIR' variable. For 184f3dfa9d3Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185f3dfa9d3Smrg`/alternate/directory' before all installation names. The approach of 186f3dfa9d3Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187f3dfa9d3Smrgdoes not work on platforms that have drive letters. On the other hand, 188f3dfa9d3Smrgit does better at avoiding recompilation issues, and works well even 189f3dfa9d3Smrgwhen some directory options were not specified in terms of `${prefix}' 190f3dfa9d3Smrgat `configure' time. 191f3dfa9d3Smrg 192f3dfa9d3SmrgOptional Features 193f3dfa9d3Smrg================= 194f8a31ee4Smrg 195f8a31ee4Smrg If the package supports it, you can cause programs to be installed 196f8a31ee4Smrgwith an extra prefix or suffix on their names by giving `configure' the 197f8a31ee4Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198f8a31ee4Smrg 199f8a31ee4Smrg Some packages pay attention to `--enable-FEATURE' options to 200f8a31ee4Smrg`configure', where FEATURE indicates an optional part of the package. 201f8a31ee4SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202f8a31ee4Smrgis something like `gnu-as' or `x' (for the X Window System). The 203f8a31ee4Smrg`README' should mention any `--enable-' and `--with-' options that the 204f8a31ee4Smrgpackage recognizes. 205f8a31ee4Smrg 206f8a31ee4Smrg For packages that use the X Window System, `configure' can usually 207f8a31ee4Smrgfind the X include and library files automatically, but if it doesn't, 208f8a31ee4Smrgyou can use the `configure' options `--x-includes=DIR' and 209f8a31ee4Smrg`--x-libraries=DIR' to specify their locations. 210f8a31ee4Smrg 211f3dfa9d3Smrg Some packages offer the ability to configure how verbose the 212f3dfa9d3Smrgexecution of `make' will be. For these packages, running `./configure 213f3dfa9d3Smrg--enable-silent-rules' sets the default to minimal output, which can be 214f3dfa9d3Smrgoverridden with `make V=1'; while running `./configure 215f3dfa9d3Smrg--disable-silent-rules' sets the default to verbose, which can be 216f3dfa9d3Smrgoverridden with `make V=0'. 217f3dfa9d3Smrg 218f8a31ee4SmrgParticular systems 219f8a31ee4Smrg================== 220f8a31ee4Smrg 221f8a31ee4Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222f8a31ee4SmrgCC is not installed, it is recommended to use the following options in 223f8a31ee4Smrgorder to use an ANSI C compiler: 224f8a31ee4Smrg 225f3dfa9d3Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226f8a31ee4Smrg 227f8a31ee4Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228f8a31ee4Smrg 229f3dfa9d3Smrg HP-UX `make' updates targets which have the same time stamps as 230f3dfa9d3Smrgtheir prerequisites, which makes it generally unusable when shipped 231f3dfa9d3Smrggenerated files such as `configure' are involved. Use GNU `make' 232f3dfa9d3Smrginstead. 233f3dfa9d3Smrg 234f8a31ee4Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235f8a31ee4Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236f8a31ee4Smrga workaround. If GNU CC is not installed, it is therefore recommended 237f8a31ee4Smrgto try 238f8a31ee4Smrg 239f8a31ee4Smrg ./configure CC="cc" 240f8a31ee4Smrg 241f8a31ee4Smrgand if that doesn't work, try 242f8a31ee4Smrg 243f8a31ee4Smrg ./configure CC="cc -nodtk" 244f8a31ee4Smrg 245f3dfa9d3Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246f3dfa9d3Smrgdirectory contains several dysfunctional programs; working variants of 247f3dfa9d3Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248f3dfa9d3Smrgin your `PATH', put it _after_ `/usr/bin'. 249f3dfa9d3Smrg 250f3dfa9d3Smrg On Haiku, software installed for all users goes in `/boot/common', 251f3dfa9d3Smrgnot `/usr/local'. It is recommended to use the following options: 252f3dfa9d3Smrg 253f3dfa9d3Smrg ./configure --prefix=/boot/common 254f3dfa9d3Smrg 255f8a31ee4SmrgSpecifying the System Type 256f8a31ee4Smrg========================== 257f8a31ee4Smrg 258f8a31ee4Smrg There may be some features `configure' cannot figure out 259f8a31ee4Smrgautomatically, but needs to determine by the type of machine the package 260f8a31ee4Smrgwill run on. Usually, assuming the package is built to be run on the 261f8a31ee4Smrg_same_ architectures, `configure' can figure that out, but if it prints 262f8a31ee4Smrga message saying it cannot guess the machine type, give it the 263f8a31ee4Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264f8a31ee4Smrgtype, such as `sun4', or a canonical name which has the form: 265f8a31ee4Smrg 266f8a31ee4Smrg CPU-COMPANY-SYSTEM 267f8a31ee4Smrg 268f8a31ee4Smrgwhere SYSTEM can have one of these forms: 269f8a31ee4Smrg 270f3dfa9d3Smrg OS 271f3dfa9d3Smrg KERNEL-OS 272f8a31ee4Smrg 273f8a31ee4Smrg See the file `config.sub' for the possible values of each field. If 274f8a31ee4Smrg`config.sub' isn't included in this package, then this package doesn't 275f8a31ee4Smrgneed to know the machine type. 276f8a31ee4Smrg 277f8a31ee4Smrg If you are _building_ compiler tools for cross-compiling, you should 278f8a31ee4Smrguse the option `--target=TYPE' to select the type of system they will 279f8a31ee4Smrgproduce code for. 280f8a31ee4Smrg 281f8a31ee4Smrg If you want to _use_ a cross compiler, that generates code for a 282f8a31ee4Smrgplatform different from the build platform, you should specify the 283f8a31ee4Smrg"host" platform (i.e., that on which the generated programs will 284f8a31ee4Smrgeventually be run) with `--host=TYPE'. 285f8a31ee4Smrg 286f8a31ee4SmrgSharing Defaults 287f8a31ee4Smrg================ 288f8a31ee4Smrg 289f8a31ee4Smrg If you want to set default values for `configure' scripts to share, 290f8a31ee4Smrgyou can create a site shell script called `config.site' that gives 291f8a31ee4Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292f8a31ee4Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293f8a31ee4Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294f8a31ee4Smrg`CONFIG_SITE' environment variable to the location of the site script. 295f8a31ee4SmrgA warning: not all `configure' scripts look for a site script. 296f8a31ee4Smrg 297f8a31ee4SmrgDefining Variables 298f8a31ee4Smrg================== 299f8a31ee4Smrg 300f8a31ee4Smrg Variables not defined in a site shell script can be set in the 301f8a31ee4Smrgenvironment passed to `configure'. However, some packages may run 302f8a31ee4Smrgconfigure again during the build, and the customized values of these 303f8a31ee4Smrgvariables may be lost. In order to avoid this problem, you should set 304f8a31ee4Smrgthem in the `configure' command line, using `VAR=value'. For example: 305f8a31ee4Smrg 306f8a31ee4Smrg ./configure CC=/usr/local2/bin/gcc 307f8a31ee4Smrg 308f8a31ee4Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309f8a31ee4Smrgoverridden in the site shell script). 310f8a31ee4Smrg 311f8a31ee4SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312f8a31ee4Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313f8a31ee4Smrg 314f8a31ee4Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315f8a31ee4Smrg 316f8a31ee4Smrg`configure' Invocation 317f8a31ee4Smrg====================== 318f8a31ee4Smrg 319f8a31ee4Smrg `configure' recognizes the following options to control how it 320f8a31ee4Smrgoperates. 321f8a31ee4Smrg 322f8a31ee4Smrg`--help' 323f8a31ee4Smrg`-h' 324f8a31ee4Smrg Print a summary of all of the options to `configure', and exit. 325f8a31ee4Smrg 326f8a31ee4Smrg`--help=short' 327f8a31ee4Smrg`--help=recursive' 328f8a31ee4Smrg Print a summary of the options unique to this package's 329f8a31ee4Smrg `configure', and exit. The `short' variant lists options used 330f8a31ee4Smrg only in the top level, while the `recursive' variant lists options 331f8a31ee4Smrg also present in any nested packages. 332f8a31ee4Smrg 333f8a31ee4Smrg`--version' 334f8a31ee4Smrg`-V' 335f8a31ee4Smrg Print the version of Autoconf used to generate the `configure' 336f8a31ee4Smrg script, and exit. 337f8a31ee4Smrg 338f8a31ee4Smrg`--cache-file=FILE' 339f8a31ee4Smrg Enable the cache: use and save the results of the tests in FILE, 340f8a31ee4Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341f8a31ee4Smrg disable caching. 342f8a31ee4Smrg 343f8a31ee4Smrg`--config-cache' 344f8a31ee4Smrg`-C' 345f8a31ee4Smrg Alias for `--cache-file=config.cache'. 346f8a31ee4Smrg 347f8a31ee4Smrg`--quiet' 348f8a31ee4Smrg`--silent' 349f8a31ee4Smrg`-q' 350f8a31ee4Smrg Do not print messages saying which checks are being made. To 351f8a31ee4Smrg suppress all normal output, redirect it to `/dev/null' (any error 352f8a31ee4Smrg messages will still be shown). 353f8a31ee4Smrg 354f8a31ee4Smrg`--srcdir=DIR' 355f8a31ee4Smrg Look for the package's source code in directory DIR. Usually 356f8a31ee4Smrg `configure' can determine that directory automatically. 357f8a31ee4Smrg 358f8a31ee4Smrg`--prefix=DIR' 359f3dfa9d3Smrg Use DIR as the installation prefix. *note Installation Names:: 360f8a31ee4Smrg for more details, including other options available for fine-tuning 361f8a31ee4Smrg the installation locations. 362f8a31ee4Smrg 363f8a31ee4Smrg`--no-create' 364f8a31ee4Smrg`-n' 365f8a31ee4Smrg Run the configure checks, but stop before creating any output 366f8a31ee4Smrg files. 367f8a31ee4Smrg 368f8a31ee4Smrg`configure' also accepts some other, not widely useful, options. Run 369f8a31ee4Smrg`configure --help' for more details. 370f8a31ee4Smrg 371