114330f12SmrgInstallation Instructions 214330f12Smrg************************* 314330f12Smrg 489b0dc75SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 589b0dc75SmrgInc. 614330f12Smrg 789b0dc75Smrg Copying and distribution of this file, with or without modification, 889b0dc75Smrgare permitted in any medium without royalty provided the copyright 989b0dc75Smrgnotice and this notice are preserved. This file is offered as-is, 1089b0dc75Smrgwithout warranty of any kind. 1114330f12Smrg 1214330f12SmrgBasic Installation 1314330f12Smrg================== 1414330f12Smrg 1514330f12Smrg Briefly, the shell commands `./configure; make; make install' should 1614330f12Smrgconfigure, build, and install this package. The following 1714330f12Smrgmore-detailed instructions are generic; see the `README' file for 1889b0dc75Smrginstructions specific to this package. Some packages provide this 1989b0dc75Smrg`INSTALL' file but do not implement all of the features documented 2089b0dc75Smrgbelow. The lack of an optional feature in a given package is not 2189b0dc75Smrgnecessarily a bug. More recommendations for GNU packages can be found 2289b0dc75Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2314330f12Smrg 2414330f12Smrg The `configure' shell script attempts to guess correct values for 2514330f12Smrgvarious system-dependent variables used during compilation. It uses 2614330f12Smrgthose values to create a `Makefile' in each directory of the package. 2714330f12SmrgIt may also create one or more `.h' files containing system-dependent 2814330f12Smrgdefinitions. Finally, it creates a shell script `config.status' that 2914330f12Smrgyou can run in the future to recreate the current configuration, and a 3014330f12Smrgfile `config.log' containing compiler output (useful mainly for 3114330f12Smrgdebugging `configure'). 3214330f12Smrg 3314330f12Smrg It can also use an optional file (typically called `config.cache' 3414330f12Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3514330f12Smrgthe results of its tests to speed up reconfiguring. Caching is 3614330f12Smrgdisabled by default to prevent problems with accidental use of stale 3714330f12Smrgcache files. 3814330f12Smrg 3914330f12Smrg If you need to do unusual things to compile the package, please try 4014330f12Smrgto figure out how `configure' could check whether to do them, and mail 4114330f12Smrgdiffs or instructions to the address given in the `README' so they can 4214330f12Smrgbe considered for the next release. If you are using the cache, and at 4314330f12Smrgsome point `config.cache' contains results you don't want to keep, you 4414330f12Smrgmay remove or edit it. 4514330f12Smrg 4614330f12Smrg The file `configure.ac' (or `configure.in') is used to create 4714330f12Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4814330f12Smrgyou want to change it or regenerate `configure' using a newer version 4914330f12Smrgof `autoconf'. 5014330f12Smrg 5189b0dc75Smrg The simplest way to compile this package is: 5214330f12Smrg 5314330f12Smrg 1. `cd' to the directory containing the package's source code and type 5414330f12Smrg `./configure' to configure the package for your system. 5514330f12Smrg 5614330f12Smrg Running `configure' might take a while. While running, it prints 5714330f12Smrg some messages telling which features it is checking for. 5814330f12Smrg 5914330f12Smrg 2. Type `make' to compile the package. 6014330f12Smrg 6114330f12Smrg 3. Optionally, type `make check' to run any self-tests that come with 6289b0dc75Smrg the package, generally using the just-built uninstalled binaries. 6314330f12Smrg 6414330f12Smrg 4. Type `make install' to install the programs and any data files and 6589b0dc75Smrg documentation. When installing into a prefix owned by root, it is 6689b0dc75Smrg recommended that the package be configured and built as a regular 6789b0dc75Smrg user, and only the `make install' phase executed with root 6889b0dc75Smrg privileges. 6989b0dc75Smrg 7089b0dc75Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7189b0dc75Smrg this time using the binaries in their final installed location. 7289b0dc75Smrg This target does not install anything. Running this target as a 7389b0dc75Smrg regular user, particularly if the prior `make install' required 7489b0dc75Smrg root privileges, verifies that the installation completed 7589b0dc75Smrg correctly. 7689b0dc75Smrg 7789b0dc75Smrg 6. You can remove the program binaries and object files from the 7814330f12Smrg source code directory by typing `make clean'. To also remove the 7914330f12Smrg files that `configure' created (so you can compile the package for 8014330f12Smrg a different kind of computer), type `make distclean'. There is 8114330f12Smrg also a `make maintainer-clean' target, but that is intended mainly 8214330f12Smrg for the package's developers. If you use it, you may have to get 8314330f12Smrg all sorts of other programs in order to regenerate files that came 8414330f12Smrg with the distribution. 8514330f12Smrg 8689b0dc75Smrg 7. Often, you can also type `make uninstall' to remove the installed 8789b0dc75Smrg files again. In practice, not all packages have tested that 8889b0dc75Smrg uninstallation works correctly, even though it is required by the 8989b0dc75Smrg GNU Coding Standards. 9089b0dc75Smrg 9189b0dc75Smrg 8. Some packages, particularly those that use Automake, provide `make 9289b0dc75Smrg distcheck', which can by used by developers to test that all other 9389b0dc75Smrg targets like `make install' and `make uninstall' work correctly. 9489b0dc75Smrg This target is generally not run by end users. 9514330f12Smrg 9614330f12SmrgCompilers and Options 9714330f12Smrg===================== 9814330f12Smrg 9914330f12Smrg Some systems require unusual options for compilation or linking that 10014330f12Smrgthe `configure' script does not know about. Run `./configure --help' 10114330f12Smrgfor details on some of the pertinent environment variables. 10214330f12Smrg 10314330f12Smrg You can give `configure' initial values for configuration parameters 10414330f12Smrgby setting variables in the command line or in the environment. Here 10514330f12Smrgis an example: 10614330f12Smrg 10714330f12Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10814330f12Smrg 10914330f12Smrg *Note Defining Variables::, for more details. 11014330f12Smrg 11114330f12SmrgCompiling For Multiple Architectures 11214330f12Smrg==================================== 11314330f12Smrg 11414330f12Smrg You can compile the package for more than one kind of computer at the 11514330f12Smrgsame time, by placing the object files for each architecture in their 11614330f12Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11714330f12Smrgdirectory where you want the object files and executables to go and run 11814330f12Smrgthe `configure' script. `configure' automatically checks for the 11989b0dc75Smrgsource code in the directory that `configure' is in and in `..'. This 12089b0dc75Smrgis known as a "VPATH" build. 12114330f12Smrg 12214330f12Smrg With a non-GNU `make', it is safer to compile the package for one 12314330f12Smrgarchitecture at a time in the source code directory. After you have 12414330f12Smrginstalled the package for one architecture, use `make distclean' before 12514330f12Smrgreconfiguring for another architecture. 12614330f12Smrg 12714330f12Smrg On MacOS X 10.5 and later systems, you can create libraries and 12814330f12Smrgexecutables that work on multiple system types--known as "fat" or 12914330f12Smrg"universal" binaries--by specifying multiple `-arch' options to the 13014330f12Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13114330f12Smrgthis: 13214330f12Smrg 13314330f12Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13414330f12Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13514330f12Smrg CPP="gcc -E" CXXCPP="g++ -E" 13614330f12Smrg 13714330f12Smrg This is not guaranteed to produce working output in all cases, you 13814330f12Smrgmay have to build one architecture at a time and combine the results 13914330f12Smrgusing the `lipo' tool if you have problems. 14014330f12Smrg 14114330f12SmrgInstallation Names 14214330f12Smrg================== 14314330f12Smrg 14414330f12Smrg By default, `make install' installs the package's commands under 14514330f12Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14614330f12Smrgcan specify an installation prefix other than `/usr/local' by giving 14789b0dc75Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14889b0dc75Smrgabsolute file name. 14914330f12Smrg 15014330f12Smrg You can specify separate installation prefixes for 15114330f12Smrgarchitecture-specific files and architecture-independent files. If you 15214330f12Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15314330f12SmrgPREFIX as the prefix for installing programs and libraries. 15414330f12SmrgDocumentation and other data files still use the regular prefix. 15514330f12Smrg 15614330f12Smrg In addition, if you use an unusual directory layout you can give 15714330f12Smrgoptions like `--bindir=DIR' to specify different values for particular 15814330f12Smrgkinds of files. Run `configure --help' for a list of the directories 15989b0dc75Smrgyou can set and what kinds of files go in them. In general, the 16089b0dc75Smrgdefault for these options is expressed in terms of `${prefix}', so that 16189b0dc75Smrgspecifying just `--prefix' will affect all of the other directory 16289b0dc75Smrgspecifications that were not explicitly provided. 16389b0dc75Smrg 16489b0dc75Smrg The most portable way to affect installation locations is to pass the 16589b0dc75Smrgcorrect locations to `configure'; however, many packages provide one or 16689b0dc75Smrgboth of the following shortcuts of passing variable assignments to the 16789b0dc75Smrg`make install' command line to change installation locations without 16889b0dc75Smrghaving to reconfigure or recompile. 16989b0dc75Smrg 17089b0dc75Smrg The first method involves providing an override variable for each 17189b0dc75Smrgaffected directory. For example, `make install 17289b0dc75Smrgprefix=/alternate/directory' will choose an alternate location for all 17389b0dc75Smrgdirectory configuration variables that were expressed in terms of 17489b0dc75Smrg`${prefix}'. Any directories that were specified during `configure', 17589b0dc75Smrgbut not in terms of `${prefix}', must each be overridden at install 17689b0dc75Smrgtime for the entire installation to be relocated. The approach of 17789b0dc75Smrgmakefile variable overrides for each directory variable is required by 17889b0dc75Smrgthe GNU Coding Standards, and ideally causes no recompilation. 17989b0dc75SmrgHowever, some platforms have known limitations with the semantics of 18089b0dc75Smrgshared libraries that end up requiring recompilation when using this 18189b0dc75Smrgmethod, particularly noticeable in packages that use GNU Libtool. 18289b0dc75Smrg 18389b0dc75Smrg The second method involves providing the `DESTDIR' variable. For 18489b0dc75Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 18589b0dc75Smrg`/alternate/directory' before all installation names. The approach of 18689b0dc75Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18789b0dc75Smrgdoes not work on platforms that have drive letters. On the other hand, 18889b0dc75Smrgit does better at avoiding recompilation issues, and works well even 18989b0dc75Smrgwhen some directory options were not specified in terms of `${prefix}' 19089b0dc75Smrgat `configure' time. 19189b0dc75Smrg 19289b0dc75SmrgOptional Features 19389b0dc75Smrg================= 19414330f12Smrg 19514330f12Smrg If the package supports it, you can cause programs to be installed 19614330f12Smrgwith an extra prefix or suffix on their names by giving `configure' the 19714330f12Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19814330f12Smrg 19914330f12Smrg Some packages pay attention to `--enable-FEATURE' options to 20014330f12Smrg`configure', where FEATURE indicates an optional part of the package. 20114330f12SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20214330f12Smrgis something like `gnu-as' or `x' (for the X Window System). The 20314330f12Smrg`README' should mention any `--enable-' and `--with-' options that the 20414330f12Smrgpackage recognizes. 20514330f12Smrg 20614330f12Smrg For packages that use the X Window System, `configure' can usually 20714330f12Smrgfind the X include and library files automatically, but if it doesn't, 20814330f12Smrgyou can use the `configure' options `--x-includes=DIR' and 20914330f12Smrg`--x-libraries=DIR' to specify their locations. 21014330f12Smrg 21189b0dc75Smrg Some packages offer the ability to configure how verbose the 21289b0dc75Smrgexecution of `make' will be. For these packages, running `./configure 21389b0dc75Smrg--enable-silent-rules' sets the default to minimal output, which can be 21489b0dc75Smrgoverridden with `make V=1'; while running `./configure 21589b0dc75Smrg--disable-silent-rules' sets the default to verbose, which can be 21689b0dc75Smrgoverridden with `make V=0'. 21789b0dc75Smrg 21814330f12SmrgParticular systems 21914330f12Smrg================== 22014330f12Smrg 22114330f12Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22214330f12SmrgCC is not installed, it is recommended to use the following options in 22314330f12Smrgorder to use an ANSI C compiler: 22414330f12Smrg 22589b0dc75Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22614330f12Smrg 22714330f12Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22814330f12Smrg 22989b0dc75Smrg HP-UX `make' updates targets which have the same time stamps as 23089b0dc75Smrgtheir prerequisites, which makes it generally unusable when shipped 23189b0dc75Smrggenerated files such as `configure' are involved. Use GNU `make' 23289b0dc75Smrginstead. 23389b0dc75Smrg 23414330f12Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23514330f12Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23614330f12Smrga workaround. If GNU CC is not installed, it is therefore recommended 23714330f12Smrgto try 23814330f12Smrg 23914330f12Smrg ./configure CC="cc" 24014330f12Smrg 24114330f12Smrgand if that doesn't work, try 24214330f12Smrg 24314330f12Smrg ./configure CC="cc -nodtk" 24414330f12Smrg 24589b0dc75Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24689b0dc75Smrgdirectory contains several dysfunctional programs; working variants of 24789b0dc75Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24889b0dc75Smrgin your `PATH', put it _after_ `/usr/bin'. 24989b0dc75Smrg 25089b0dc75Smrg On Haiku, software installed for all users goes in `/boot/common', 25189b0dc75Smrgnot `/usr/local'. It is recommended to use the following options: 25289b0dc75Smrg 25389b0dc75Smrg ./configure --prefix=/boot/common 25489b0dc75Smrg 25514330f12SmrgSpecifying the System Type 25614330f12Smrg========================== 25714330f12Smrg 25814330f12Smrg There may be some features `configure' cannot figure out 25914330f12Smrgautomatically, but needs to determine by the type of machine the package 26014330f12Smrgwill run on. Usually, assuming the package is built to be run on the 26114330f12Smrg_same_ architectures, `configure' can figure that out, but if it prints 26214330f12Smrga message saying it cannot guess the machine type, give it the 26314330f12Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26414330f12Smrgtype, such as `sun4', or a canonical name which has the form: 26514330f12Smrg 26614330f12Smrg CPU-COMPANY-SYSTEM 26714330f12Smrg 26814330f12Smrgwhere SYSTEM can have one of these forms: 26914330f12Smrg 27089b0dc75Smrg OS 27189b0dc75Smrg KERNEL-OS 27214330f12Smrg 27314330f12Smrg See the file `config.sub' for the possible values of each field. If 27414330f12Smrg`config.sub' isn't included in this package, then this package doesn't 27514330f12Smrgneed to know the machine type. 27614330f12Smrg 27714330f12Smrg If you are _building_ compiler tools for cross-compiling, you should 27814330f12Smrguse the option `--target=TYPE' to select the type of system they will 27914330f12Smrgproduce code for. 28014330f12Smrg 28114330f12Smrg If you want to _use_ a cross compiler, that generates code for a 28214330f12Smrgplatform different from the build platform, you should specify the 28314330f12Smrg"host" platform (i.e., that on which the generated programs will 28414330f12Smrgeventually be run) with `--host=TYPE'. 28514330f12Smrg 28614330f12SmrgSharing Defaults 28714330f12Smrg================ 28814330f12Smrg 28914330f12Smrg If you want to set default values for `configure' scripts to share, 29014330f12Smrgyou can create a site shell script called `config.site' that gives 29114330f12Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29214330f12Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29314330f12Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29414330f12Smrg`CONFIG_SITE' environment variable to the location of the site script. 29514330f12SmrgA warning: not all `configure' scripts look for a site script. 29614330f12Smrg 29714330f12SmrgDefining Variables 29814330f12Smrg================== 29914330f12Smrg 30014330f12Smrg Variables not defined in a site shell script can be set in the 30114330f12Smrgenvironment passed to `configure'. However, some packages may run 30214330f12Smrgconfigure again during the build, and the customized values of these 30314330f12Smrgvariables may be lost. In order to avoid this problem, you should set 30414330f12Smrgthem in the `configure' command line, using `VAR=value'. For example: 30514330f12Smrg 30614330f12Smrg ./configure CC=/usr/local2/bin/gcc 30714330f12Smrg 30814330f12Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30914330f12Smrgoverridden in the site shell script). 31014330f12Smrg 31114330f12SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31214330f12Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31314330f12Smrg 31414330f12Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31514330f12Smrg 31614330f12Smrg`configure' Invocation 31714330f12Smrg====================== 31814330f12Smrg 31914330f12Smrg `configure' recognizes the following options to control how it 32014330f12Smrgoperates. 32114330f12Smrg 32214330f12Smrg`--help' 32314330f12Smrg`-h' 32414330f12Smrg Print a summary of all of the options to `configure', and exit. 32514330f12Smrg 32614330f12Smrg`--help=short' 32714330f12Smrg`--help=recursive' 32814330f12Smrg Print a summary of the options unique to this package's 32914330f12Smrg `configure', and exit. The `short' variant lists options used 33014330f12Smrg only in the top level, while the `recursive' variant lists options 33114330f12Smrg also present in any nested packages. 33214330f12Smrg 33314330f12Smrg`--version' 33414330f12Smrg`-V' 33514330f12Smrg Print the version of Autoconf used to generate the `configure' 33614330f12Smrg script, and exit. 33714330f12Smrg 33814330f12Smrg`--cache-file=FILE' 33914330f12Smrg Enable the cache: use and save the results of the tests in FILE, 34014330f12Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34114330f12Smrg disable caching. 34214330f12Smrg 34314330f12Smrg`--config-cache' 34414330f12Smrg`-C' 34514330f12Smrg Alias for `--cache-file=config.cache'. 34614330f12Smrg 34714330f12Smrg`--quiet' 34814330f12Smrg`--silent' 34914330f12Smrg`-q' 35014330f12Smrg Do not print messages saying which checks are being made. To 35114330f12Smrg suppress all normal output, redirect it to `/dev/null' (any error 35214330f12Smrg messages will still be shown). 35314330f12Smrg 35414330f12Smrg`--srcdir=DIR' 35514330f12Smrg Look for the package's source code in directory DIR. Usually 35614330f12Smrg `configure' can determine that directory automatically. 35714330f12Smrg 35814330f12Smrg`--prefix=DIR' 35989b0dc75Smrg Use DIR as the installation prefix. *note Installation Names:: 36014330f12Smrg for more details, including other options available for fine-tuning 36114330f12Smrg the installation locations. 36214330f12Smrg 36314330f12Smrg`--no-create' 36414330f12Smrg`-n' 36514330f12Smrg Run the configure checks, but stop before creating any output 36614330f12Smrg files. 36714330f12Smrg 36814330f12Smrg`configure' also accepts some other, not widely useful, options. Run 36914330f12Smrg`configure --help' for more details. 37014330f12Smrg 371