19ef0b394SmrgInstallation Instructions 29ef0b394Smrg************************* 39ef0b394Smrg 4fb5e8d76SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5fb5e8d76SmrgInc. 69ef0b394Smrg 7fb5e8d76Smrg Copying and distribution of this file, with or without modification, 8fb5e8d76Smrgare permitted in any medium without royalty provided the copyright 9fb5e8d76Smrgnotice and this notice are preserved. This file is offered as-is, 10fb5e8d76Smrgwithout warranty of any kind. 119ef0b394Smrg 129ef0b394SmrgBasic Installation 139ef0b394Smrg================== 149ef0b394Smrg 159ef0b394Smrg Briefly, the shell commands `./configure; make; make install' should 169ef0b394Smrgconfigure, build, and install this package. The following 179ef0b394Smrgmore-detailed instructions are generic; see the `README' file for 18fb5e8d76Smrginstructions specific to this package. Some packages provide this 19fb5e8d76Smrg`INSTALL' file but do not implement all of the features documented 20fb5e8d76Smrgbelow. The lack of an optional feature in a given package is not 21fb5e8d76Smrgnecessarily a bug. More recommendations for GNU packages can be found 22fb5e8d76Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 239ef0b394Smrg 249ef0b394Smrg The `configure' shell script attempts to guess correct values for 259ef0b394Smrgvarious system-dependent variables used during compilation. It uses 269ef0b394Smrgthose values to create a `Makefile' in each directory of the package. 279ef0b394SmrgIt may also create one or more `.h' files containing system-dependent 289ef0b394Smrgdefinitions. Finally, it creates a shell script `config.status' that 299ef0b394Smrgyou can run in the future to recreate the current configuration, and a 309ef0b394Smrgfile `config.log' containing compiler output (useful mainly for 319ef0b394Smrgdebugging `configure'). 329ef0b394Smrg 339ef0b394Smrg It can also use an optional file (typically called `config.cache' 349ef0b394Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 359ef0b394Smrgthe results of its tests to speed up reconfiguring. Caching is 369ef0b394Smrgdisabled by default to prevent problems with accidental use of stale 379ef0b394Smrgcache files. 389ef0b394Smrg 399ef0b394Smrg If you need to do unusual things to compile the package, please try 409ef0b394Smrgto figure out how `configure' could check whether to do them, and mail 419ef0b394Smrgdiffs or instructions to the address given in the `README' so they can 429ef0b394Smrgbe considered for the next release. If you are using the cache, and at 439ef0b394Smrgsome point `config.cache' contains results you don't want to keep, you 449ef0b394Smrgmay remove or edit it. 459ef0b394Smrg 469ef0b394Smrg The file `configure.ac' (or `configure.in') is used to create 479ef0b394Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 489ef0b394Smrgyou want to change it or regenerate `configure' using a newer version 499ef0b394Smrgof `autoconf'. 509ef0b394Smrg 51fb5e8d76Smrg The simplest way to compile this package is: 529ef0b394Smrg 539ef0b394Smrg 1. `cd' to the directory containing the package's source code and type 549ef0b394Smrg `./configure' to configure the package for your system. 559ef0b394Smrg 569ef0b394Smrg Running `configure' might take a while. While running, it prints 579ef0b394Smrg some messages telling which features it is checking for. 589ef0b394Smrg 599ef0b394Smrg 2. Type `make' to compile the package. 609ef0b394Smrg 619ef0b394Smrg 3. Optionally, type `make check' to run any self-tests that come with 62fb5e8d76Smrg the package, generally using the just-built uninstalled binaries. 639ef0b394Smrg 649ef0b394Smrg 4. Type `make install' to install the programs and any data files and 65fb5e8d76Smrg documentation. When installing into a prefix owned by root, it is 66fb5e8d76Smrg recommended that the package be configured and built as a regular 67fb5e8d76Smrg user, and only the `make install' phase executed with root 68fb5e8d76Smrg privileges. 69fb5e8d76Smrg 70fb5e8d76Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71fb5e8d76Smrg this time using the binaries in their final installed location. 72fb5e8d76Smrg This target does not install anything. Running this target as a 73fb5e8d76Smrg regular user, particularly if the prior `make install' required 74fb5e8d76Smrg root privileges, verifies that the installation completed 75fb5e8d76Smrg correctly. 76fb5e8d76Smrg 77fb5e8d76Smrg 6. You can remove the program binaries and object files from the 789ef0b394Smrg source code directory by typing `make clean'. To also remove the 799ef0b394Smrg files that `configure' created (so you can compile the package for 809ef0b394Smrg a different kind of computer), type `make distclean'. There is 819ef0b394Smrg also a `make maintainer-clean' target, but that is intended mainly 829ef0b394Smrg for the package's developers. If you use it, you may have to get 839ef0b394Smrg all sorts of other programs in order to regenerate files that came 849ef0b394Smrg with the distribution. 859ef0b394Smrg 86fb5e8d76Smrg 7. Often, you can also type `make uninstall' to remove the installed 87fb5e8d76Smrg files again. In practice, not all packages have tested that 88fb5e8d76Smrg uninstallation works correctly, even though it is required by the 89fb5e8d76Smrg GNU Coding Standards. 90fb5e8d76Smrg 91fb5e8d76Smrg 8. Some packages, particularly those that use Automake, provide `make 92fb5e8d76Smrg distcheck', which can by used by developers to test that all other 93fb5e8d76Smrg targets like `make install' and `make uninstall' work correctly. 94fb5e8d76Smrg This target is generally not run by end users. 959ef0b394Smrg 969ef0b394SmrgCompilers and Options 979ef0b394Smrg===================== 989ef0b394Smrg 999ef0b394Smrg Some systems require unusual options for compilation or linking that 1009ef0b394Smrgthe `configure' script does not know about. Run `./configure --help' 1019ef0b394Smrgfor details on some of the pertinent environment variables. 1029ef0b394Smrg 1039ef0b394Smrg You can give `configure' initial values for configuration parameters 1049ef0b394Smrgby setting variables in the command line or in the environment. Here 1059ef0b394Smrgis an example: 1069ef0b394Smrg 1079ef0b394Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1089ef0b394Smrg 1099ef0b394Smrg *Note Defining Variables::, for more details. 1109ef0b394Smrg 1119ef0b394SmrgCompiling For Multiple Architectures 1129ef0b394Smrg==================================== 1139ef0b394Smrg 1149ef0b394Smrg You can compile the package for more than one kind of computer at the 1159ef0b394Smrgsame time, by placing the object files for each architecture in their 1169ef0b394Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1179ef0b394Smrgdirectory where you want the object files and executables to go and run 1189ef0b394Smrgthe `configure' script. `configure' automatically checks for the 119fb5e8d76Smrgsource code in the directory that `configure' is in and in `..'. This 120fb5e8d76Smrgis known as a "VPATH" build. 1219ef0b394Smrg 1229ef0b394Smrg With a non-GNU `make', it is safer to compile the package for one 1239ef0b394Smrgarchitecture at a time in the source code directory. After you have 1249ef0b394Smrginstalled the package for one architecture, use `make distclean' before 1259ef0b394Smrgreconfiguring for another architecture. 1269ef0b394Smrg 1279ef0b394Smrg On MacOS X 10.5 and later systems, you can create libraries and 1289ef0b394Smrgexecutables that work on multiple system types--known as "fat" or 1299ef0b394Smrg"universal" binaries--by specifying multiple `-arch' options to the 1309ef0b394Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1319ef0b394Smrgthis: 1329ef0b394Smrg 1339ef0b394Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1349ef0b394Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1359ef0b394Smrg CPP="gcc -E" CXXCPP="g++ -E" 1369ef0b394Smrg 1379ef0b394Smrg This is not guaranteed to produce working output in all cases, you 1389ef0b394Smrgmay have to build one architecture at a time and combine the results 1399ef0b394Smrgusing the `lipo' tool if you have problems. 1409ef0b394Smrg 1419ef0b394SmrgInstallation Names 1429ef0b394Smrg================== 1439ef0b394Smrg 1449ef0b394Smrg By default, `make install' installs the package's commands under 1459ef0b394Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1469ef0b394Smrgcan specify an installation prefix other than `/usr/local' by giving 147fb5e8d76Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148fb5e8d76Smrgabsolute file name. 1499ef0b394Smrg 1509ef0b394Smrg You can specify separate installation prefixes for 1519ef0b394Smrgarchitecture-specific files and architecture-independent files. If you 1529ef0b394Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1539ef0b394SmrgPREFIX as the prefix for installing programs and libraries. 1549ef0b394SmrgDocumentation and other data files still use the regular prefix. 1559ef0b394Smrg 1569ef0b394Smrg In addition, if you use an unusual directory layout you can give 1579ef0b394Smrgoptions like `--bindir=DIR' to specify different values for particular 1589ef0b394Smrgkinds of files. Run `configure --help' for a list of the directories 159fb5e8d76Smrgyou can set and what kinds of files go in them. In general, the 160fb5e8d76Smrgdefault for these options is expressed in terms of `${prefix}', so that 161fb5e8d76Smrgspecifying just `--prefix' will affect all of the other directory 162fb5e8d76Smrgspecifications that were not explicitly provided. 163fb5e8d76Smrg 164fb5e8d76Smrg The most portable way to affect installation locations is to pass the 165fb5e8d76Smrgcorrect locations to `configure'; however, many packages provide one or 166fb5e8d76Smrgboth of the following shortcuts of passing variable assignments to the 167fb5e8d76Smrg`make install' command line to change installation locations without 168fb5e8d76Smrghaving to reconfigure or recompile. 169fb5e8d76Smrg 170fb5e8d76Smrg The first method involves providing an override variable for each 171fb5e8d76Smrgaffected directory. For example, `make install 172fb5e8d76Smrgprefix=/alternate/directory' will choose an alternate location for all 173fb5e8d76Smrgdirectory configuration variables that were expressed in terms of 174fb5e8d76Smrg`${prefix}'. Any directories that were specified during `configure', 175fb5e8d76Smrgbut not in terms of `${prefix}', must each be overridden at install 176fb5e8d76Smrgtime for the entire installation to be relocated. The approach of 177fb5e8d76Smrgmakefile variable overrides for each directory variable is required by 178fb5e8d76Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179fb5e8d76SmrgHowever, some platforms have known limitations with the semantics of 180fb5e8d76Smrgshared libraries that end up requiring recompilation when using this 181fb5e8d76Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182fb5e8d76Smrg 183fb5e8d76Smrg The second method involves providing the `DESTDIR' variable. For 184fb5e8d76Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185fb5e8d76Smrg`/alternate/directory' before all installation names. The approach of 186fb5e8d76Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187fb5e8d76Smrgdoes not work on platforms that have drive letters. On the other hand, 188fb5e8d76Smrgit does better at avoiding recompilation issues, and works well even 189fb5e8d76Smrgwhen some directory options were not specified in terms of `${prefix}' 190fb5e8d76Smrgat `configure' time. 191fb5e8d76Smrg 192fb5e8d76SmrgOptional Features 193fb5e8d76Smrg================= 1949ef0b394Smrg 1959ef0b394Smrg If the package supports it, you can cause programs to be installed 1969ef0b394Smrgwith an extra prefix or suffix on their names by giving `configure' the 1979ef0b394Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1989ef0b394Smrg 1999ef0b394Smrg Some packages pay attention to `--enable-FEATURE' options to 2009ef0b394Smrg`configure', where FEATURE indicates an optional part of the package. 2019ef0b394SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2029ef0b394Smrgis something like `gnu-as' or `x' (for the X Window System). The 2039ef0b394Smrg`README' should mention any `--enable-' and `--with-' options that the 2049ef0b394Smrgpackage recognizes. 2059ef0b394Smrg 2069ef0b394Smrg For packages that use the X Window System, `configure' can usually 2079ef0b394Smrgfind the X include and library files automatically, but if it doesn't, 2089ef0b394Smrgyou can use the `configure' options `--x-includes=DIR' and 2099ef0b394Smrg`--x-libraries=DIR' to specify their locations. 2109ef0b394Smrg 211fb5e8d76Smrg Some packages offer the ability to configure how verbose the 212fb5e8d76Smrgexecution of `make' will be. For these packages, running `./configure 213fb5e8d76Smrg--enable-silent-rules' sets the default to minimal output, which can be 214fb5e8d76Smrgoverridden with `make V=1'; while running `./configure 215fb5e8d76Smrg--disable-silent-rules' sets the default to verbose, which can be 216fb5e8d76Smrgoverridden with `make V=0'. 217fb5e8d76Smrg 2189ef0b394SmrgParticular systems 2199ef0b394Smrg================== 2209ef0b394Smrg 2219ef0b394Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2229ef0b394SmrgCC is not installed, it is recommended to use the following options in 2239ef0b394Smrgorder to use an ANSI C compiler: 2249ef0b394Smrg 225fb5e8d76Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2269ef0b394Smrg 2279ef0b394Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2289ef0b394Smrg 229fb5e8d76Smrg HP-UX `make' updates targets which have the same time stamps as 230fb5e8d76Smrgtheir prerequisites, which makes it generally unusable when shipped 231fb5e8d76Smrggenerated files such as `configure' are involved. Use GNU `make' 232fb5e8d76Smrginstead. 233fb5e8d76Smrg 2349ef0b394Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2359ef0b394Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2369ef0b394Smrga workaround. If GNU CC is not installed, it is therefore recommended 2379ef0b394Smrgto try 2389ef0b394Smrg 2399ef0b394Smrg ./configure CC="cc" 2409ef0b394Smrg 2419ef0b394Smrgand if that doesn't work, try 2429ef0b394Smrg 2439ef0b394Smrg ./configure CC="cc -nodtk" 2449ef0b394Smrg 245fb5e8d76Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246fb5e8d76Smrgdirectory contains several dysfunctional programs; working variants of 247fb5e8d76Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248fb5e8d76Smrgin your `PATH', put it _after_ `/usr/bin'. 249fb5e8d76Smrg 250fb5e8d76Smrg On Haiku, software installed for all users goes in `/boot/common', 251fb5e8d76Smrgnot `/usr/local'. It is recommended to use the following options: 252fb5e8d76Smrg 253fb5e8d76Smrg ./configure --prefix=/boot/common 254fb5e8d76Smrg 2559ef0b394SmrgSpecifying the System Type 2569ef0b394Smrg========================== 2579ef0b394Smrg 2589ef0b394Smrg There may be some features `configure' cannot figure out 2599ef0b394Smrgautomatically, but needs to determine by the type of machine the package 2609ef0b394Smrgwill run on. Usually, assuming the package is built to be run on the 2619ef0b394Smrg_same_ architectures, `configure' can figure that out, but if it prints 2629ef0b394Smrga message saying it cannot guess the machine type, give it the 2639ef0b394Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2649ef0b394Smrgtype, such as `sun4', or a canonical name which has the form: 2659ef0b394Smrg 2669ef0b394Smrg CPU-COMPANY-SYSTEM 2679ef0b394Smrg 2689ef0b394Smrgwhere SYSTEM can have one of these forms: 2699ef0b394Smrg 270fb5e8d76Smrg OS 271fb5e8d76Smrg KERNEL-OS 2729ef0b394Smrg 2739ef0b394Smrg See the file `config.sub' for the possible values of each field. If 2749ef0b394Smrg`config.sub' isn't included in this package, then this package doesn't 2759ef0b394Smrgneed to know the machine type. 2769ef0b394Smrg 2779ef0b394Smrg If you are _building_ compiler tools for cross-compiling, you should 2789ef0b394Smrguse the option `--target=TYPE' to select the type of system they will 2799ef0b394Smrgproduce code for. 2809ef0b394Smrg 2819ef0b394Smrg If you want to _use_ a cross compiler, that generates code for a 2829ef0b394Smrgplatform different from the build platform, you should specify the 2839ef0b394Smrg"host" platform (i.e., that on which the generated programs will 2849ef0b394Smrgeventually be run) with `--host=TYPE'. 2859ef0b394Smrg 2869ef0b394SmrgSharing Defaults 2879ef0b394Smrg================ 2889ef0b394Smrg 2899ef0b394Smrg If you want to set default values for `configure' scripts to share, 2909ef0b394Smrgyou can create a site shell script called `config.site' that gives 2919ef0b394Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2929ef0b394Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2939ef0b394Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2949ef0b394Smrg`CONFIG_SITE' environment variable to the location of the site script. 2959ef0b394SmrgA warning: not all `configure' scripts look for a site script. 2969ef0b394Smrg 2979ef0b394SmrgDefining Variables 2989ef0b394Smrg================== 2999ef0b394Smrg 3009ef0b394Smrg Variables not defined in a site shell script can be set in the 3019ef0b394Smrgenvironment passed to `configure'. However, some packages may run 3029ef0b394Smrgconfigure again during the build, and the customized values of these 3039ef0b394Smrgvariables may be lost. In order to avoid this problem, you should set 3049ef0b394Smrgthem in the `configure' command line, using `VAR=value'. For example: 3059ef0b394Smrg 3069ef0b394Smrg ./configure CC=/usr/local2/bin/gcc 3079ef0b394Smrg 3089ef0b394Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3099ef0b394Smrgoverridden in the site shell script). 3109ef0b394Smrg 3119ef0b394SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3129ef0b394Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3139ef0b394Smrg 3149ef0b394Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3159ef0b394Smrg 3169ef0b394Smrg`configure' Invocation 3179ef0b394Smrg====================== 3189ef0b394Smrg 3199ef0b394Smrg `configure' recognizes the following options to control how it 3209ef0b394Smrgoperates. 3219ef0b394Smrg 3229ef0b394Smrg`--help' 3239ef0b394Smrg`-h' 3249ef0b394Smrg Print a summary of all of the options to `configure', and exit. 3259ef0b394Smrg 3269ef0b394Smrg`--help=short' 3279ef0b394Smrg`--help=recursive' 3289ef0b394Smrg Print a summary of the options unique to this package's 3299ef0b394Smrg `configure', and exit. The `short' variant lists options used 3309ef0b394Smrg only in the top level, while the `recursive' variant lists options 3319ef0b394Smrg also present in any nested packages. 3329ef0b394Smrg 3339ef0b394Smrg`--version' 3349ef0b394Smrg`-V' 3359ef0b394Smrg Print the version of Autoconf used to generate the `configure' 3369ef0b394Smrg script, and exit. 3379ef0b394Smrg 3389ef0b394Smrg`--cache-file=FILE' 3399ef0b394Smrg Enable the cache: use and save the results of the tests in FILE, 3409ef0b394Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3419ef0b394Smrg disable caching. 3429ef0b394Smrg 3439ef0b394Smrg`--config-cache' 3449ef0b394Smrg`-C' 3459ef0b394Smrg Alias for `--cache-file=config.cache'. 3469ef0b394Smrg 3479ef0b394Smrg`--quiet' 3489ef0b394Smrg`--silent' 3499ef0b394Smrg`-q' 3509ef0b394Smrg Do not print messages saying which checks are being made. To 3519ef0b394Smrg suppress all normal output, redirect it to `/dev/null' (any error 3529ef0b394Smrg messages will still be shown). 3539ef0b394Smrg 3549ef0b394Smrg`--srcdir=DIR' 3559ef0b394Smrg Look for the package's source code in directory DIR. Usually 3569ef0b394Smrg `configure' can determine that directory automatically. 3579ef0b394Smrg 3589ef0b394Smrg`--prefix=DIR' 359fb5e8d76Smrg Use DIR as the installation prefix. *note Installation Names:: 3609ef0b394Smrg for more details, including other options available for fine-tuning 3619ef0b394Smrg the installation locations. 3629ef0b394Smrg 3639ef0b394Smrg`--no-create' 3649ef0b394Smrg`-n' 3659ef0b394Smrg Run the configure checks, but stop before creating any output 3669ef0b394Smrg files. 3679ef0b394Smrg 3689ef0b394Smrg`configure' also accepts some other, not widely useful, options. Run 3699ef0b394Smrg`configure --help' for more details. 3709ef0b394Smrg 371