11477040fSmrgInstallation Instructions 21477040fSmrg************************* 31477040fSmrg 4339a7c43SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5339a7c43SmrgInc. 6444c061aSmrg 7339a7c43Smrg Copying and distribution of this file, with or without modification, 8339a7c43Smrgare permitted in any medium without royalty provided the copyright 9339a7c43Smrgnotice and this notice are preserved. This file is offered as-is, 10339a7c43Smrgwithout warranty of any kind. 11444c061aSmrg 12444c061aSmrgBasic Installation 13444c061aSmrg================== 14444c061aSmrg 151477040fSmrg Briefly, the shell commands `./configure; make; make install' should 161477040fSmrgconfigure, build, and install this package. The following 171477040fSmrgmore-detailed instructions are generic; see the `README' file for 18339a7c43Smrginstructions specific to this package. Some packages provide this 19339a7c43Smrg`INSTALL' file but do not implement all of the features documented 20339a7c43Smrgbelow. The lack of an optional feature in a given package is not 21339a7c43Smrgnecessarily a bug. More recommendations for GNU packages can be found 22339a7c43Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23444c061aSmrg 24444c061aSmrg The `configure' shell script attempts to guess correct values for 25444c061aSmrgvarious system-dependent variables used during compilation. It uses 26444c061aSmrgthose values to create a `Makefile' in each directory of the package. 27444c061aSmrgIt may also create one or more `.h' files containing system-dependent 28444c061aSmrgdefinitions. Finally, it creates a shell script `config.status' that 29444c061aSmrgyou can run in the future to recreate the current configuration, and a 30444c061aSmrgfile `config.log' containing compiler output (useful mainly for 31444c061aSmrgdebugging `configure'). 32444c061aSmrg 33444c061aSmrg It can also use an optional file (typically called `config.cache' 34444c061aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 351477040fSmrgthe results of its tests to speed up reconfiguring. Caching is 36444c061aSmrgdisabled by default to prevent problems with accidental use of stale 371477040fSmrgcache files. 38444c061aSmrg 39444c061aSmrg If you need to do unusual things to compile the package, please try 40444c061aSmrgto figure out how `configure' could check whether to do them, and mail 41444c061aSmrgdiffs or instructions to the address given in the `README' so they can 42444c061aSmrgbe considered for the next release. If you are using the cache, and at 43444c061aSmrgsome point `config.cache' contains results you don't want to keep, you 44444c061aSmrgmay remove or edit it. 45444c061aSmrg 46444c061aSmrg The file `configure.ac' (or `configure.in') is used to create 471477040fSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 481477040fSmrgyou want to change it or regenerate `configure' using a newer version 491477040fSmrgof `autoconf'. 50444c061aSmrg 51339a7c43Smrg The simplest way to compile this package is: 52444c061aSmrg 53444c061aSmrg 1. `cd' to the directory containing the package's source code and type 541477040fSmrg `./configure' to configure the package for your system. 55444c061aSmrg 561477040fSmrg Running `configure' might take a while. While running, it prints 571477040fSmrg some messages telling which features it is checking for. 58444c061aSmrg 59444c061aSmrg 2. Type `make' to compile the package. 60444c061aSmrg 61444c061aSmrg 3. Optionally, type `make check' to run any self-tests that come with 62339a7c43Smrg the package, generally using the just-built uninstalled binaries. 63444c061aSmrg 64444c061aSmrg 4. Type `make install' to install the programs and any data files and 65339a7c43Smrg documentation. When installing into a prefix owned by root, it is 66339a7c43Smrg recommended that the package be configured and built as a regular 67339a7c43Smrg user, and only the `make install' phase executed with root 68339a7c43Smrg privileges. 69339a7c43Smrg 70339a7c43Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71339a7c43Smrg this time using the binaries in their final installed location. 72339a7c43Smrg This target does not install anything. Running this target as a 73339a7c43Smrg regular user, particularly if the prior `make install' required 74339a7c43Smrg root privileges, verifies that the installation completed 75339a7c43Smrg correctly. 76339a7c43Smrg 77339a7c43Smrg 6. You can remove the program binaries and object files from the 78444c061aSmrg source code directory by typing `make clean'. To also remove the 79444c061aSmrg files that `configure' created (so you can compile the package for 80444c061aSmrg a different kind of computer), type `make distclean'. There is 81444c061aSmrg also a `make maintainer-clean' target, but that is intended mainly 82444c061aSmrg for the package's developers. If you use it, you may have to get 83444c061aSmrg all sorts of other programs in order to regenerate files that came 84444c061aSmrg with the distribution. 85444c061aSmrg 86339a7c43Smrg 7. Often, you can also type `make uninstall' to remove the installed 87339a7c43Smrg files again. In practice, not all packages have tested that 88339a7c43Smrg uninstallation works correctly, even though it is required by the 89339a7c43Smrg GNU Coding Standards. 90339a7c43Smrg 91339a7c43Smrg 8. Some packages, particularly those that use Automake, provide `make 92339a7c43Smrg distcheck', which can by used by developers to test that all other 93339a7c43Smrg targets like `make install' and `make uninstall' work correctly. 94339a7c43Smrg This target is generally not run by end users. 951477040fSmrg 96444c061aSmrgCompilers and Options 97444c061aSmrg===================== 98444c061aSmrg 99444c061aSmrg Some systems require unusual options for compilation or linking that 100444c061aSmrgthe `configure' script does not know about. Run `./configure --help' 101444c061aSmrgfor details on some of the pertinent environment variables. 102444c061aSmrg 103444c061aSmrg You can give `configure' initial values for configuration parameters 104444c061aSmrgby setting variables in the command line or in the environment. Here 105444c061aSmrgis an example: 106444c061aSmrg 1071477040fSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108444c061aSmrg 109444c061aSmrg *Note Defining Variables::, for more details. 110444c061aSmrg 111444c061aSmrgCompiling For Multiple Architectures 112444c061aSmrg==================================== 113444c061aSmrg 114444c061aSmrg You can compile the package for more than one kind of computer at the 115444c061aSmrgsame time, by placing the object files for each architecture in their 1161477040fSmrgown directory. To do this, you can use GNU `make'. `cd' to the 117444c061aSmrgdirectory where you want the object files and executables to go and run 118444c061aSmrgthe `configure' script. `configure' automatically checks for the 119339a7c43Smrgsource code in the directory that `configure' is in and in `..'. This 120339a7c43Smrgis known as a "VPATH" build. 121444c061aSmrg 1221477040fSmrg With a non-GNU `make', it is safer to compile the package for one 1231477040fSmrgarchitecture at a time in the source code directory. After you have 1241477040fSmrginstalled the package for one architecture, use `make distclean' before 1251477040fSmrgreconfiguring for another architecture. 1261477040fSmrg 1271477040fSmrg On MacOS X 10.5 and later systems, you can create libraries and 1281477040fSmrgexecutables that work on multiple system types--known as "fat" or 1291477040fSmrg"universal" binaries--by specifying multiple `-arch' options to the 1301477040fSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1311477040fSmrgthis: 1321477040fSmrg 1331477040fSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1341477040fSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1351477040fSmrg CPP="gcc -E" CXXCPP="g++ -E" 1361477040fSmrg 1371477040fSmrg This is not guaranteed to produce working output in all cases, you 1381477040fSmrgmay have to build one architecture at a time and combine the results 1391477040fSmrgusing the `lipo' tool if you have problems. 140444c061aSmrg 141444c061aSmrgInstallation Names 142444c061aSmrg================== 143444c061aSmrg 1441477040fSmrg By default, `make install' installs the package's commands under 1451477040fSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1461477040fSmrgcan specify an installation prefix other than `/usr/local' by giving 147339a7c43Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148339a7c43Smrgabsolute file name. 149444c061aSmrg 150444c061aSmrg You can specify separate installation prefixes for 151444c061aSmrgarchitecture-specific files and architecture-independent files. If you 1521477040fSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1531477040fSmrgPREFIX as the prefix for installing programs and libraries. 1541477040fSmrgDocumentation and other data files still use the regular prefix. 155444c061aSmrg 156444c061aSmrg In addition, if you use an unusual directory layout you can give 1571477040fSmrgoptions like `--bindir=DIR' to specify different values for particular 158444c061aSmrgkinds of files. Run `configure --help' for a list of the directories 159339a7c43Smrgyou can set and what kinds of files go in them. In general, the 160339a7c43Smrgdefault for these options is expressed in terms of `${prefix}', so that 161339a7c43Smrgspecifying just `--prefix' will affect all of the other directory 162339a7c43Smrgspecifications that were not explicitly provided. 163339a7c43Smrg 164339a7c43Smrg The most portable way to affect installation locations is to pass the 165339a7c43Smrgcorrect locations to `configure'; however, many packages provide one or 166339a7c43Smrgboth of the following shortcuts of passing variable assignments to the 167339a7c43Smrg`make install' command line to change installation locations without 168339a7c43Smrghaving to reconfigure or recompile. 169339a7c43Smrg 170339a7c43Smrg The first method involves providing an override variable for each 171339a7c43Smrgaffected directory. For example, `make install 172339a7c43Smrgprefix=/alternate/directory' will choose an alternate location for all 173339a7c43Smrgdirectory configuration variables that were expressed in terms of 174339a7c43Smrg`${prefix}'. Any directories that were specified during `configure', 175339a7c43Smrgbut not in terms of `${prefix}', must each be overridden at install 176339a7c43Smrgtime for the entire installation to be relocated. The approach of 177339a7c43Smrgmakefile variable overrides for each directory variable is required by 178339a7c43Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179339a7c43SmrgHowever, some platforms have known limitations with the semantics of 180339a7c43Smrgshared libraries that end up requiring recompilation when using this 181339a7c43Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182339a7c43Smrg 183339a7c43Smrg The second method involves providing the `DESTDIR' variable. For 184339a7c43Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185339a7c43Smrg`/alternate/directory' before all installation names. The approach of 186339a7c43Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187339a7c43Smrgdoes not work on platforms that have drive letters. On the other hand, 188339a7c43Smrgit does better at avoiding recompilation issues, and works well even 189339a7c43Smrgwhen some directory options were not specified in terms of `${prefix}' 190339a7c43Smrgat `configure' time. 191339a7c43Smrg 192339a7c43SmrgOptional Features 193339a7c43Smrg================= 194444c061aSmrg 195444c061aSmrg If the package supports it, you can cause programs to be installed 196444c061aSmrgwith an extra prefix or suffix on their names by giving `configure' the 197444c061aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198444c061aSmrg 199444c061aSmrg Some packages pay attention to `--enable-FEATURE' options to 200444c061aSmrg`configure', where FEATURE indicates an optional part of the package. 201444c061aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202444c061aSmrgis something like `gnu-as' or `x' (for the X Window System). The 203444c061aSmrg`README' should mention any `--enable-' and `--with-' options that the 204444c061aSmrgpackage recognizes. 205444c061aSmrg 206444c061aSmrg For packages that use the X Window System, `configure' can usually 207444c061aSmrgfind the X include and library files automatically, but if it doesn't, 208444c061aSmrgyou can use the `configure' options `--x-includes=DIR' and 209444c061aSmrg`--x-libraries=DIR' to specify their locations. 210444c061aSmrg 211339a7c43Smrg Some packages offer the ability to configure how verbose the 212339a7c43Smrgexecution of `make' will be. For these packages, running `./configure 213339a7c43Smrg--enable-silent-rules' sets the default to minimal output, which can be 214339a7c43Smrgoverridden with `make V=1'; while running `./configure 215339a7c43Smrg--disable-silent-rules' sets the default to verbose, which can be 216339a7c43Smrgoverridden with `make V=0'. 217339a7c43Smrg 2181477040fSmrgParticular systems 2191477040fSmrg================== 2201477040fSmrg 2211477040fSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2221477040fSmrgCC is not installed, it is recommended to use the following options in 2231477040fSmrgorder to use an ANSI C compiler: 2241477040fSmrg 225339a7c43Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2261477040fSmrg 2271477040fSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2281477040fSmrg 229339a7c43Smrg HP-UX `make' updates targets which have the same time stamps as 230339a7c43Smrgtheir prerequisites, which makes it generally unusable when shipped 231339a7c43Smrggenerated files such as `configure' are involved. Use GNU `make' 232339a7c43Smrginstead. 233339a7c43Smrg 2341477040fSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2351477040fSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2361477040fSmrga workaround. If GNU CC is not installed, it is therefore recommended 2371477040fSmrgto try 2381477040fSmrg 2391477040fSmrg ./configure CC="cc" 2401477040fSmrg 2411477040fSmrgand if that doesn't work, try 2421477040fSmrg 2431477040fSmrg ./configure CC="cc -nodtk" 2441477040fSmrg 245339a7c43Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246339a7c43Smrgdirectory contains several dysfunctional programs; working variants of 247339a7c43Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248339a7c43Smrgin your `PATH', put it _after_ `/usr/bin'. 249339a7c43Smrg 250339a7c43Smrg On Haiku, software installed for all users goes in `/boot/common', 251339a7c43Smrgnot `/usr/local'. It is recommended to use the following options: 252339a7c43Smrg 253339a7c43Smrg ./configure --prefix=/boot/common 254339a7c43Smrg 255444c061aSmrgSpecifying the System Type 256444c061aSmrg========================== 257444c061aSmrg 258444c061aSmrg There may be some features `configure' cannot figure out 259444c061aSmrgautomatically, but needs to determine by the type of machine the package 260444c061aSmrgwill run on. Usually, assuming the package is built to be run on the 261444c061aSmrg_same_ architectures, `configure' can figure that out, but if it prints 262444c061aSmrga message saying it cannot guess the machine type, give it the 263444c061aSmrg`--build=TYPE' option. TYPE can either be a short name for the system 264444c061aSmrgtype, such as `sun4', or a canonical name which has the form: 265444c061aSmrg 266444c061aSmrg CPU-COMPANY-SYSTEM 267444c061aSmrg 268444c061aSmrgwhere SYSTEM can have one of these forms: 269444c061aSmrg 270339a7c43Smrg OS 271339a7c43Smrg KERNEL-OS 272444c061aSmrg 273444c061aSmrg See the file `config.sub' for the possible values of each field. If 274444c061aSmrg`config.sub' isn't included in this package, then this package doesn't 275444c061aSmrgneed to know the machine type. 276444c061aSmrg 277444c061aSmrg If you are _building_ compiler tools for cross-compiling, you should 2781477040fSmrguse the option `--target=TYPE' to select the type of system they will 279444c061aSmrgproduce code for. 280444c061aSmrg 281444c061aSmrg If you want to _use_ a cross compiler, that generates code for a 282444c061aSmrgplatform different from the build platform, you should specify the 283444c061aSmrg"host" platform (i.e., that on which the generated programs will 284444c061aSmrgeventually be run) with `--host=TYPE'. 285444c061aSmrg 286444c061aSmrgSharing Defaults 287444c061aSmrg================ 288444c061aSmrg 289444c061aSmrg If you want to set default values for `configure' scripts to share, 290444c061aSmrgyou can create a site shell script called `config.site' that gives 291444c061aSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 292444c061aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293444c061aSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294444c061aSmrg`CONFIG_SITE' environment variable to the location of the site script. 295444c061aSmrgA warning: not all `configure' scripts look for a site script. 296444c061aSmrg 297444c061aSmrgDefining Variables 298444c061aSmrg================== 299444c061aSmrg 300444c061aSmrg Variables not defined in a site shell script can be set in the 301444c061aSmrgenvironment passed to `configure'. However, some packages may run 302444c061aSmrgconfigure again during the build, and the customized values of these 303444c061aSmrgvariables may be lost. In order to avoid this problem, you should set 304444c061aSmrgthem in the `configure' command line, using `VAR=value'. For example: 305444c061aSmrg 306444c061aSmrg ./configure CC=/usr/local2/bin/gcc 307444c061aSmrg 3081477040fSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 309444c061aSmrgoverridden in the site shell script). 310444c061aSmrg 3111477040fSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3121477040fSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3131477040fSmrg 3141477040fSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3151477040fSmrg 316444c061aSmrg`configure' Invocation 317444c061aSmrg====================== 318444c061aSmrg 319444c061aSmrg `configure' recognizes the following options to control how it 320444c061aSmrgoperates. 321444c061aSmrg 322444c061aSmrg`--help' 323444c061aSmrg`-h' 3241477040fSmrg Print a summary of all of the options to `configure', and exit. 3251477040fSmrg 3261477040fSmrg`--help=short' 3271477040fSmrg`--help=recursive' 3281477040fSmrg Print a summary of the options unique to this package's 3291477040fSmrg `configure', and exit. The `short' variant lists options used 3301477040fSmrg only in the top level, while the `recursive' variant lists options 3311477040fSmrg also present in any nested packages. 332444c061aSmrg 333444c061aSmrg`--version' 334444c061aSmrg`-V' 335444c061aSmrg Print the version of Autoconf used to generate the `configure' 336444c061aSmrg script, and exit. 337444c061aSmrg 338444c061aSmrg`--cache-file=FILE' 339444c061aSmrg Enable the cache: use and save the results of the tests in FILE, 340444c061aSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341444c061aSmrg disable caching. 342444c061aSmrg 343444c061aSmrg`--config-cache' 344444c061aSmrg`-C' 345444c061aSmrg Alias for `--cache-file=config.cache'. 346444c061aSmrg 347444c061aSmrg`--quiet' 348444c061aSmrg`--silent' 349444c061aSmrg`-q' 350444c061aSmrg Do not print messages saying which checks are being made. To 351444c061aSmrg suppress all normal output, redirect it to `/dev/null' (any error 352444c061aSmrg messages will still be shown). 353444c061aSmrg 354444c061aSmrg`--srcdir=DIR' 355444c061aSmrg Look for the package's source code in directory DIR. Usually 356444c061aSmrg `configure' can determine that directory automatically. 357444c061aSmrg 3581477040fSmrg`--prefix=DIR' 359339a7c43Smrg Use DIR as the installation prefix. *note Installation Names:: 3601477040fSmrg for more details, including other options available for fine-tuning 3611477040fSmrg the installation locations. 3621477040fSmrg 3631477040fSmrg`--no-create' 3641477040fSmrg`-n' 3651477040fSmrg Run the configure checks, but stop before creating any output 3661477040fSmrg files. 3671477040fSmrg 368444c061aSmrg`configure' also accepts some other, not widely useful, options. Run 369444c061aSmrg`configure --help' for more details. 370444c061aSmrg 371