147e89262SmrgInstallation Instructions 247e89262Smrg************************* 347e89262Smrg 4e6d2e958SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5e6d2e958SmrgInc. 6bd1da9d7Smrg 7e6d2e958Smrg Copying and distribution of this file, with or without modification, 8e6d2e958Smrgare permitted in any medium without royalty provided the copyright 9e6d2e958Smrgnotice and this notice are preserved. This file is offered as-is, 10e6d2e958Smrgwithout warranty of any kind. 11bd1da9d7Smrg 12bd1da9d7SmrgBasic Installation 13bd1da9d7Smrg================== 14bd1da9d7Smrg 1547e89262Smrg Briefly, the shell commands `./configure; make; make install' should 1647e89262Smrgconfigure, build, and install this package. The following 1747e89262Smrgmore-detailed instructions are generic; see the `README' file for 18e6d2e958Smrginstructions specific to this package. Some packages provide this 19e6d2e958Smrg`INSTALL' file but do not implement all of the features documented 20e6d2e958Smrgbelow. The lack of an optional feature in a given package is not 21e6d2e958Smrgnecessarily a bug. More recommendations for GNU packages can be found 22e6d2e958Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 23bd1da9d7Smrg 24bd1da9d7Smrg The `configure' shell script attempts to guess correct values for 25bd1da9d7Smrgvarious system-dependent variables used during compilation. It uses 26bd1da9d7Smrgthose values to create a `Makefile' in each directory of the package. 27bd1da9d7SmrgIt may also create one or more `.h' files containing system-dependent 28bd1da9d7Smrgdefinitions. Finally, it creates a shell script `config.status' that 29bd1da9d7Smrgyou can run in the future to recreate the current configuration, and a 30bd1da9d7Smrgfile `config.log' containing compiler output (useful mainly for 31bd1da9d7Smrgdebugging `configure'). 32bd1da9d7Smrg 33bd1da9d7Smrg It can also use an optional file (typically called `config.cache' 34bd1da9d7Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3547e89262Smrgthe results of its tests to speed up reconfiguring. Caching is 36bd1da9d7Smrgdisabled by default to prevent problems with accidental use of stale 3747e89262Smrgcache files. 38bd1da9d7Smrg 39bd1da9d7Smrg If you need to do unusual things to compile the package, please try 40bd1da9d7Smrgto figure out how `configure' could check whether to do them, and mail 41bd1da9d7Smrgdiffs or instructions to the address given in the `README' so they can 42bd1da9d7Smrgbe considered for the next release. If you are using the cache, and at 43bd1da9d7Smrgsome point `config.cache' contains results you don't want to keep, you 44bd1da9d7Smrgmay remove or edit it. 45bd1da9d7Smrg 46bd1da9d7Smrg The file `configure.ac' (or `configure.in') is used to create 4747e89262Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4847e89262Smrgyou want to change it or regenerate `configure' using a newer version 4947e89262Smrgof `autoconf'. 50bd1da9d7Smrg 51e6d2e958Smrg The simplest way to compile this package is: 52bd1da9d7Smrg 53bd1da9d7Smrg 1. `cd' to the directory containing the package's source code and type 5447e89262Smrg `./configure' to configure the package for your system. 55bd1da9d7Smrg 5647e89262Smrg Running `configure' might take a while. While running, it prints 5747e89262Smrg some messages telling which features it is checking for. 58bd1da9d7Smrg 59bd1da9d7Smrg 2. Type `make' to compile the package. 60bd1da9d7Smrg 61bd1da9d7Smrg 3. Optionally, type `make check' to run any self-tests that come with 62e6d2e958Smrg the package, generally using the just-built uninstalled binaries. 63bd1da9d7Smrg 64bd1da9d7Smrg 4. Type `make install' to install the programs and any data files and 65e6d2e958Smrg documentation. When installing into a prefix owned by root, it is 66e6d2e958Smrg recommended that the package be configured and built as a regular 67e6d2e958Smrg user, and only the `make install' phase executed with root 68e6d2e958Smrg privileges. 69e6d2e958Smrg 70e6d2e958Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71e6d2e958Smrg this time using the binaries in their final installed location. 72e6d2e958Smrg This target does not install anything. Running this target as a 73e6d2e958Smrg regular user, particularly if the prior `make install' required 74e6d2e958Smrg root privileges, verifies that the installation completed 75e6d2e958Smrg correctly. 76e6d2e958Smrg 77e6d2e958Smrg 6. You can remove the program binaries and object files from the 78bd1da9d7Smrg source code directory by typing `make clean'. To also remove the 79bd1da9d7Smrg files that `configure' created (so you can compile the package for 80bd1da9d7Smrg a different kind of computer), type `make distclean'. There is 81bd1da9d7Smrg also a `make maintainer-clean' target, but that is intended mainly 82bd1da9d7Smrg for the package's developers. If you use it, you may have to get 83bd1da9d7Smrg all sorts of other programs in order to regenerate files that came 84bd1da9d7Smrg with the distribution. 85bd1da9d7Smrg 86e6d2e958Smrg 7. Often, you can also type `make uninstall' to remove the installed 87e6d2e958Smrg files again. In practice, not all packages have tested that 88e6d2e958Smrg uninstallation works correctly, even though it is required by the 89e6d2e958Smrg GNU Coding Standards. 90e6d2e958Smrg 91e6d2e958Smrg 8. Some packages, particularly those that use Automake, provide `make 92e6d2e958Smrg distcheck', which can by used by developers to test that all other 93e6d2e958Smrg targets like `make install' and `make uninstall' work correctly. 94e6d2e958Smrg This target is generally not run by end users. 9547e89262Smrg 96bd1da9d7SmrgCompilers and Options 97bd1da9d7Smrg===================== 98bd1da9d7Smrg 99bd1da9d7Smrg Some systems require unusual options for compilation or linking that 100bd1da9d7Smrgthe `configure' script does not know about. Run `./configure --help' 101bd1da9d7Smrgfor details on some of the pertinent environment variables. 102bd1da9d7Smrg 103bd1da9d7Smrg You can give `configure' initial values for configuration parameters 104bd1da9d7Smrgby setting variables in the command line or in the environment. Here 105bd1da9d7Smrgis an example: 106bd1da9d7Smrg 10747e89262Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108bd1da9d7Smrg 109bd1da9d7Smrg *Note Defining Variables::, for more details. 110bd1da9d7Smrg 111bd1da9d7SmrgCompiling For Multiple Architectures 112bd1da9d7Smrg==================================== 113bd1da9d7Smrg 114bd1da9d7Smrg You can compile the package for more than one kind of computer at the 115bd1da9d7Smrgsame time, by placing the object files for each architecture in their 11647e89262Smrgown directory. To do this, you can use GNU `make'. `cd' to the 117bd1da9d7Smrgdirectory where you want the object files and executables to go and run 118bd1da9d7Smrgthe `configure' script. `configure' automatically checks for the 119e6d2e958Smrgsource code in the directory that `configure' is in and in `..'. This 120e6d2e958Smrgis known as a "VPATH" build. 121bd1da9d7Smrg 12247e89262Smrg With a non-GNU `make', it is safer to compile the package for one 12347e89262Smrgarchitecture at a time in the source code directory. After you have 12447e89262Smrginstalled the package for one architecture, use `make distclean' before 12547e89262Smrgreconfiguring for another architecture. 12647e89262Smrg 12747e89262Smrg On MacOS X 10.5 and later systems, you can create libraries and 12847e89262Smrgexecutables that work on multiple system types--known as "fat" or 12947e89262Smrg"universal" binaries--by specifying multiple `-arch' options to the 13047e89262Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13147e89262Smrgthis: 13247e89262Smrg 13347e89262Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13447e89262Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13547e89262Smrg CPP="gcc -E" CXXCPP="g++ -E" 13647e89262Smrg 13747e89262Smrg This is not guaranteed to produce working output in all cases, you 13847e89262Smrgmay have to build one architecture at a time and combine the results 13947e89262Smrgusing the `lipo' tool if you have problems. 140bd1da9d7Smrg 141bd1da9d7SmrgInstallation Names 142bd1da9d7Smrg================== 143bd1da9d7Smrg 14447e89262Smrg By default, `make install' installs the package's commands under 14547e89262Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14647e89262Smrgcan specify an installation prefix other than `/usr/local' by giving 147e6d2e958Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148e6d2e958Smrgabsolute file name. 149bd1da9d7Smrg 150bd1da9d7Smrg You can specify separate installation prefixes for 151bd1da9d7Smrgarchitecture-specific files and architecture-independent files. If you 15247e89262Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15347e89262SmrgPREFIX as the prefix for installing programs and libraries. 15447e89262SmrgDocumentation and other data files still use the regular prefix. 155bd1da9d7Smrg 156bd1da9d7Smrg In addition, if you use an unusual directory layout you can give 15747e89262Smrgoptions like `--bindir=DIR' to specify different values for particular 158bd1da9d7Smrgkinds of files. Run `configure --help' for a list of the directories 159e6d2e958Smrgyou can set and what kinds of files go in them. In general, the 160e6d2e958Smrgdefault for these options is expressed in terms of `${prefix}', so that 161e6d2e958Smrgspecifying just `--prefix' will affect all of the other directory 162e6d2e958Smrgspecifications that were not explicitly provided. 163e6d2e958Smrg 164e6d2e958Smrg The most portable way to affect installation locations is to pass the 165e6d2e958Smrgcorrect locations to `configure'; however, many packages provide one or 166e6d2e958Smrgboth of the following shortcuts of passing variable assignments to the 167e6d2e958Smrg`make install' command line to change installation locations without 168e6d2e958Smrghaving to reconfigure or recompile. 169e6d2e958Smrg 170e6d2e958Smrg The first method involves providing an override variable for each 171e6d2e958Smrgaffected directory. For example, `make install 172e6d2e958Smrgprefix=/alternate/directory' will choose an alternate location for all 173e6d2e958Smrgdirectory configuration variables that were expressed in terms of 174e6d2e958Smrg`${prefix}'. Any directories that were specified during `configure', 175e6d2e958Smrgbut not in terms of `${prefix}', must each be overridden at install 176e6d2e958Smrgtime for the entire installation to be relocated. The approach of 177e6d2e958Smrgmakefile variable overrides for each directory variable is required by 178e6d2e958Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179e6d2e958SmrgHowever, some platforms have known limitations with the semantics of 180e6d2e958Smrgshared libraries that end up requiring recompilation when using this 181e6d2e958Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182e6d2e958Smrg 183e6d2e958Smrg The second method involves providing the `DESTDIR' variable. For 184e6d2e958Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185e6d2e958Smrg`/alternate/directory' before all installation names. The approach of 186e6d2e958Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187e6d2e958Smrgdoes not work on platforms that have drive letters. On the other hand, 188e6d2e958Smrgit does better at avoiding recompilation issues, and works well even 189e6d2e958Smrgwhen some directory options were not specified in terms of `${prefix}' 190e6d2e958Smrgat `configure' time. 191e6d2e958Smrg 192e6d2e958SmrgOptional Features 193e6d2e958Smrg================= 194bd1da9d7Smrg 195bd1da9d7Smrg If the package supports it, you can cause programs to be installed 196bd1da9d7Smrgwith an extra prefix or suffix on their names by giving `configure' the 197bd1da9d7Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198bd1da9d7Smrg 199bd1da9d7Smrg Some packages pay attention to `--enable-FEATURE' options to 200bd1da9d7Smrg`configure', where FEATURE indicates an optional part of the package. 201bd1da9d7SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202bd1da9d7Smrgis something like `gnu-as' or `x' (for the X Window System). The 203bd1da9d7Smrg`README' should mention any `--enable-' and `--with-' options that the 204bd1da9d7Smrgpackage recognizes. 205bd1da9d7Smrg 206bd1da9d7Smrg For packages that use the X Window System, `configure' can usually 207bd1da9d7Smrgfind the X include and library files automatically, but if it doesn't, 208bd1da9d7Smrgyou can use the `configure' options `--x-includes=DIR' and 209bd1da9d7Smrg`--x-libraries=DIR' to specify their locations. 210bd1da9d7Smrg 211e6d2e958Smrg Some packages offer the ability to configure how verbose the 212e6d2e958Smrgexecution of `make' will be. For these packages, running `./configure 213e6d2e958Smrg--enable-silent-rules' sets the default to minimal output, which can be 214e6d2e958Smrgoverridden with `make V=1'; while running `./configure 215e6d2e958Smrg--disable-silent-rules' sets the default to verbose, which can be 216e6d2e958Smrgoverridden with `make V=0'. 217e6d2e958Smrg 21847e89262SmrgParticular systems 21947e89262Smrg================== 22047e89262Smrg 22147e89262Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22247e89262SmrgCC is not installed, it is recommended to use the following options in 22347e89262Smrgorder to use an ANSI C compiler: 22447e89262Smrg 225e6d2e958Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22647e89262Smrg 22747e89262Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22847e89262Smrg 229e6d2e958Smrg HP-UX `make' updates targets which have the same time stamps as 230e6d2e958Smrgtheir prerequisites, which makes it generally unusable when shipped 231e6d2e958Smrggenerated files such as `configure' are involved. Use GNU `make' 232e6d2e958Smrginstead. 233e6d2e958Smrg 23447e89262Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23547e89262Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23647e89262Smrga workaround. If GNU CC is not installed, it is therefore recommended 23747e89262Smrgto try 23847e89262Smrg 23947e89262Smrg ./configure CC="cc" 24047e89262Smrg 24147e89262Smrgand if that doesn't work, try 24247e89262Smrg 24347e89262Smrg ./configure CC="cc -nodtk" 24447e89262Smrg 245e6d2e958Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246e6d2e958Smrgdirectory contains several dysfunctional programs; working variants of 247e6d2e958Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248e6d2e958Smrgin your `PATH', put it _after_ `/usr/bin'. 249e6d2e958Smrg 250e6d2e958Smrg On Haiku, software installed for all users goes in `/boot/common', 251e6d2e958Smrgnot `/usr/local'. It is recommended to use the following options: 252e6d2e958Smrg 253e6d2e958Smrg ./configure --prefix=/boot/common 254e6d2e958Smrg 255bd1da9d7SmrgSpecifying the System Type 256bd1da9d7Smrg========================== 257bd1da9d7Smrg 258bd1da9d7Smrg There may be some features `configure' cannot figure out 259bd1da9d7Smrgautomatically, but needs to determine by the type of machine the package 260bd1da9d7Smrgwill run on. Usually, assuming the package is built to be run on the 261bd1da9d7Smrg_same_ architectures, `configure' can figure that out, but if it prints 262bd1da9d7Smrga message saying it cannot guess the machine type, give it the 263bd1da9d7Smrg`--build=TYPE' option. TYPE can either be a short name for the system 264bd1da9d7Smrgtype, such as `sun4', or a canonical name which has the form: 265bd1da9d7Smrg 266bd1da9d7Smrg CPU-COMPANY-SYSTEM 267bd1da9d7Smrg 268bd1da9d7Smrgwhere SYSTEM can have one of these forms: 269bd1da9d7Smrg 270e6d2e958Smrg OS 271e6d2e958Smrg KERNEL-OS 272bd1da9d7Smrg 273bd1da9d7Smrg See the file `config.sub' for the possible values of each field. If 274bd1da9d7Smrg`config.sub' isn't included in this package, then this package doesn't 275bd1da9d7Smrgneed to know the machine type. 276bd1da9d7Smrg 277bd1da9d7Smrg If you are _building_ compiler tools for cross-compiling, you should 27847e89262Smrguse the option `--target=TYPE' to select the type of system they will 279bd1da9d7Smrgproduce code for. 280bd1da9d7Smrg 281bd1da9d7Smrg If you want to _use_ a cross compiler, that generates code for a 282bd1da9d7Smrgplatform different from the build platform, you should specify the 283bd1da9d7Smrg"host" platform (i.e., that on which the generated programs will 284bd1da9d7Smrgeventually be run) with `--host=TYPE'. 285bd1da9d7Smrg 286bd1da9d7SmrgSharing Defaults 287bd1da9d7Smrg================ 288bd1da9d7Smrg 289bd1da9d7Smrg If you want to set default values for `configure' scripts to share, 290bd1da9d7Smrgyou can create a site shell script called `config.site' that gives 291bd1da9d7Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 292bd1da9d7Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 293bd1da9d7Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 294bd1da9d7Smrg`CONFIG_SITE' environment variable to the location of the site script. 295bd1da9d7SmrgA warning: not all `configure' scripts look for a site script. 296bd1da9d7Smrg 297bd1da9d7SmrgDefining Variables 298bd1da9d7Smrg================== 299bd1da9d7Smrg 300bd1da9d7Smrg Variables not defined in a site shell script can be set in the 301bd1da9d7Smrgenvironment passed to `configure'. However, some packages may run 302bd1da9d7Smrgconfigure again during the build, and the customized values of these 303bd1da9d7Smrgvariables may be lost. In order to avoid this problem, you should set 304bd1da9d7Smrgthem in the `configure' command line, using `VAR=value'. For example: 305bd1da9d7Smrg 306bd1da9d7Smrg ./configure CC=/usr/local2/bin/gcc 307bd1da9d7Smrg 30847e89262Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 309bd1da9d7Smrgoverridden in the site shell script). 310bd1da9d7Smrg 31147e89262SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31247e89262Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31347e89262Smrg 31447e89262Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31547e89262Smrg 316bd1da9d7Smrg`configure' Invocation 317bd1da9d7Smrg====================== 318bd1da9d7Smrg 319bd1da9d7Smrg `configure' recognizes the following options to control how it 320bd1da9d7Smrgoperates. 321bd1da9d7Smrg 322bd1da9d7Smrg`--help' 323bd1da9d7Smrg`-h' 32447e89262Smrg Print a summary of all of the options to `configure', and exit. 32547e89262Smrg 32647e89262Smrg`--help=short' 32747e89262Smrg`--help=recursive' 32847e89262Smrg Print a summary of the options unique to this package's 32947e89262Smrg `configure', and exit. The `short' variant lists options used 33047e89262Smrg only in the top level, while the `recursive' variant lists options 33147e89262Smrg also present in any nested packages. 332bd1da9d7Smrg 333bd1da9d7Smrg`--version' 334bd1da9d7Smrg`-V' 335bd1da9d7Smrg Print the version of Autoconf used to generate the `configure' 336bd1da9d7Smrg script, and exit. 337bd1da9d7Smrg 338bd1da9d7Smrg`--cache-file=FILE' 339bd1da9d7Smrg Enable the cache: use and save the results of the tests in FILE, 340bd1da9d7Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 341bd1da9d7Smrg disable caching. 342bd1da9d7Smrg 343bd1da9d7Smrg`--config-cache' 344bd1da9d7Smrg`-C' 345bd1da9d7Smrg Alias for `--cache-file=config.cache'. 346bd1da9d7Smrg 347bd1da9d7Smrg`--quiet' 348bd1da9d7Smrg`--silent' 349bd1da9d7Smrg`-q' 350bd1da9d7Smrg Do not print messages saying which checks are being made. To 351bd1da9d7Smrg suppress all normal output, redirect it to `/dev/null' (any error 352bd1da9d7Smrg messages will still be shown). 353bd1da9d7Smrg 354bd1da9d7Smrg`--srcdir=DIR' 355bd1da9d7Smrg Look for the package's source code in directory DIR. Usually 356bd1da9d7Smrg `configure' can determine that directory automatically. 357bd1da9d7Smrg 35847e89262Smrg`--prefix=DIR' 359e6d2e958Smrg Use DIR as the installation prefix. *note Installation Names:: 36047e89262Smrg for more details, including other options available for fine-tuning 36147e89262Smrg the installation locations. 36247e89262Smrg 36347e89262Smrg`--no-create' 36447e89262Smrg`-n' 36547e89262Smrg Run the configure checks, but stop before creating any output 36647e89262Smrg files. 36747e89262Smrg 368bd1da9d7Smrg`configure' also accepts some other, not widely useful, options. Run 369bd1da9d7Smrg`configure --help' for more details. 370bd1da9d7Smrg 371