INSTALL revision 83e03a40
183e03a40SmrgInstallation Instructions 283e03a40Smrg************************* 383e03a40Smrg 483e03a40SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 583e03a40Smrg2006, 2007, 2008 Free Software Foundation, Inc. 683e03a40Smrg 783e03a40Smrg This file is free documentation; the Free Software Foundation gives 883e03a40Smrgunlimited permission to copy, distribute and modify it. 983e03a40Smrg 1083e03a40SmrgBasic Installation 1183e03a40Smrg================== 1283e03a40Smrg 1383e03a40Smrg Briefly, the shell commands `./configure; make; make install' should 1483e03a40Smrgconfigure, build, and install this package. The following 1583e03a40Smrgmore-detailed instructions are generic; see the `README' file for 1683e03a40Smrginstructions specific to this package. 1783e03a40Smrg 1883e03a40Smrg The `configure' shell script attempts to guess correct values for 1983e03a40Smrgvarious system-dependent variables used during compilation. It uses 2083e03a40Smrgthose values to create a `Makefile' in each directory of the package. 2183e03a40SmrgIt may also create one or more `.h' files containing system-dependent 2283e03a40Smrgdefinitions. Finally, it creates a shell script `config.status' that 2383e03a40Smrgyou can run in the future to recreate the current configuration, and a 2483e03a40Smrgfile `config.log' containing compiler output (useful mainly for 2583e03a40Smrgdebugging `configure'). 2683e03a40Smrg 2783e03a40Smrg It can also use an optional file (typically called `config.cache' 2883e03a40Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2983e03a40Smrgthe results of its tests to speed up reconfiguring. Caching is 3083e03a40Smrgdisabled by default to prevent problems with accidental use of stale 3183e03a40Smrgcache files. 3283e03a40Smrg 3383e03a40Smrg If you need to do unusual things to compile the package, please try 3483e03a40Smrgto figure out how `configure' could check whether to do them, and mail 3583e03a40Smrgdiffs or instructions to the address given in the `README' so they can 3683e03a40Smrgbe considered for the next release. If you are using the cache, and at 3783e03a40Smrgsome point `config.cache' contains results you don't want to keep, you 3883e03a40Smrgmay remove or edit it. 3983e03a40Smrg 4083e03a40Smrg The file `configure.ac' (or `configure.in') is used to create 4183e03a40Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4283e03a40Smrgyou want to change it or regenerate `configure' using a newer version 4383e03a40Smrgof `autoconf'. 4483e03a40Smrg 4583e03a40SmrgThe simplest way to compile this package is: 4683e03a40Smrg 4783e03a40Smrg 1. `cd' to the directory containing the package's source code and type 4883e03a40Smrg `./configure' to configure the package for your system. 4983e03a40Smrg 5083e03a40Smrg Running `configure' might take a while. While running, it prints 5183e03a40Smrg some messages telling which features it is checking for. 5283e03a40Smrg 5383e03a40Smrg 2. Type `make' to compile the package. 5483e03a40Smrg 5583e03a40Smrg 3. Optionally, type `make check' to run any self-tests that come with 5683e03a40Smrg the package. 5783e03a40Smrg 5883e03a40Smrg 4. Type `make install' to install the programs and any data files and 5983e03a40Smrg documentation. 6083e03a40Smrg 6183e03a40Smrg 5. You can remove the program binaries and object files from the 6283e03a40Smrg source code directory by typing `make clean'. To also remove the 6383e03a40Smrg files that `configure' created (so you can compile the package for 6483e03a40Smrg a different kind of computer), type `make distclean'. There is 6583e03a40Smrg also a `make maintainer-clean' target, but that is intended mainly 6683e03a40Smrg for the package's developers. If you use it, you may have to get 6783e03a40Smrg all sorts of other programs in order to regenerate files that came 6883e03a40Smrg with the distribution. 6983e03a40Smrg 7083e03a40Smrg 6. Often, you can also type `make uninstall' to remove the installed 7183e03a40Smrg files again. 7283e03a40Smrg 7383e03a40SmrgCompilers and Options 7483e03a40Smrg===================== 7583e03a40Smrg 7683e03a40Smrg Some systems require unusual options for compilation or linking that 7783e03a40Smrgthe `configure' script does not know about. Run `./configure --help' 7883e03a40Smrgfor details on some of the pertinent environment variables. 7983e03a40Smrg 8083e03a40Smrg You can give `configure' initial values for configuration parameters 8183e03a40Smrgby setting variables in the command line or in the environment. Here 8283e03a40Smrgis an example: 8383e03a40Smrg 8483e03a40Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 8583e03a40Smrg 8683e03a40Smrg *Note Defining Variables::, for more details. 8783e03a40Smrg 8883e03a40SmrgCompiling For Multiple Architectures 8983e03a40Smrg==================================== 9083e03a40Smrg 9183e03a40Smrg You can compile the package for more than one kind of computer at the 9283e03a40Smrgsame time, by placing the object files for each architecture in their 9383e03a40Smrgown directory. To do this, you can use GNU `make'. `cd' to the 9483e03a40Smrgdirectory where you want the object files and executables to go and run 9583e03a40Smrgthe `configure' script. `configure' automatically checks for the 9683e03a40Smrgsource code in the directory that `configure' is in and in `..'. 9783e03a40Smrg 9883e03a40Smrg With a non-GNU `make', it is safer to compile the package for one 9983e03a40Smrgarchitecture at a time in the source code directory. After you have 10083e03a40Smrginstalled the package for one architecture, use `make distclean' before 10183e03a40Smrgreconfiguring for another architecture. 10283e03a40Smrg 10383e03a40Smrg On MacOS X 10.5 and later systems, you can create libraries and 10483e03a40Smrgexecutables that work on multiple system types--known as "fat" or 10583e03a40Smrg"universal" binaries--by specifying multiple `-arch' options to the 10683e03a40Smrgcompiler but only a single `-arch' option to the preprocessor. Like 10783e03a40Smrgthis: 10883e03a40Smrg 10983e03a40Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11083e03a40Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11183e03a40Smrg CPP="gcc -E" CXXCPP="g++ -E" 11283e03a40Smrg 11383e03a40Smrg This is not guaranteed to produce working output in all cases, you 11483e03a40Smrgmay have to build one architecture at a time and combine the results 11583e03a40Smrgusing the `lipo' tool if you have problems. 11683e03a40Smrg 11783e03a40SmrgInstallation Names 11883e03a40Smrg================== 11983e03a40Smrg 12083e03a40Smrg By default, `make install' installs the package's commands under 12183e03a40Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12283e03a40Smrgcan specify an installation prefix other than `/usr/local' by giving 12383e03a40Smrg`configure' the option `--prefix=PREFIX'. 12483e03a40Smrg 12583e03a40Smrg You can specify separate installation prefixes for 12683e03a40Smrgarchitecture-specific files and architecture-independent files. If you 12783e03a40Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12883e03a40SmrgPREFIX as the prefix for installing programs and libraries. 12983e03a40SmrgDocumentation and other data files still use the regular prefix. 13083e03a40Smrg 13183e03a40Smrg In addition, if you use an unusual directory layout you can give 13283e03a40Smrgoptions like `--bindir=DIR' to specify different values for particular 13383e03a40Smrgkinds of files. Run `configure --help' for a list of the directories 13483e03a40Smrgyou can set and what kinds of files go in them. 13583e03a40Smrg 13683e03a40Smrg If the package supports it, you can cause programs to be installed 13783e03a40Smrgwith an extra prefix or suffix on their names by giving `configure' the 13883e03a40Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 13983e03a40Smrg 14083e03a40SmrgOptional Features 14183e03a40Smrg================= 14283e03a40Smrg 14383e03a40Smrg Some packages pay attention to `--enable-FEATURE' options to 14483e03a40Smrg`configure', where FEATURE indicates an optional part of the package. 14583e03a40SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 14683e03a40Smrgis something like `gnu-as' or `x' (for the X Window System). The 14783e03a40Smrg`README' should mention any `--enable-' and `--with-' options that the 14883e03a40Smrgpackage recognizes. 14983e03a40Smrg 15083e03a40Smrg For packages that use the X Window System, `configure' can usually 15183e03a40Smrgfind the X include and library files automatically, but if it doesn't, 15283e03a40Smrgyou can use the `configure' options `--x-includes=DIR' and 15383e03a40Smrg`--x-libraries=DIR' to specify their locations. 15483e03a40Smrg 15583e03a40SmrgParticular systems 15683e03a40Smrg================== 15783e03a40Smrg 15883e03a40Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15983e03a40SmrgCC is not installed, it is recommended to use the following options in 16083e03a40Smrgorder to use an ANSI C compiler: 16183e03a40Smrg 16283e03a40Smrg ./configure CC="cc -Ae" 16383e03a40Smrg 16483e03a40Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16583e03a40Smrg 16683e03a40Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16783e03a40Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16883e03a40Smrga workaround. If GNU CC is not installed, it is therefore recommended 16983e03a40Smrgto try 17083e03a40Smrg 17183e03a40Smrg ./configure CC="cc" 17283e03a40Smrg 17383e03a40Smrgand if that doesn't work, try 17483e03a40Smrg 17583e03a40Smrg ./configure CC="cc -nodtk" 17683e03a40Smrg 17783e03a40SmrgSpecifying the System Type 17883e03a40Smrg========================== 17983e03a40Smrg 18083e03a40Smrg There may be some features `configure' cannot figure out 18183e03a40Smrgautomatically, but needs to determine by the type of machine the package 18283e03a40Smrgwill run on. Usually, assuming the package is built to be run on the 18383e03a40Smrg_same_ architectures, `configure' can figure that out, but if it prints 18483e03a40Smrga message saying it cannot guess the machine type, give it the 18583e03a40Smrg`--build=TYPE' option. TYPE can either be a short name for the system 18683e03a40Smrgtype, such as `sun4', or a canonical name which has the form: 18783e03a40Smrg 18883e03a40Smrg CPU-COMPANY-SYSTEM 18983e03a40Smrg 19083e03a40Smrgwhere SYSTEM can have one of these forms: 19183e03a40Smrg 19283e03a40Smrg OS KERNEL-OS 19383e03a40Smrg 19483e03a40Smrg See the file `config.sub' for the possible values of each field. If 19583e03a40Smrg`config.sub' isn't included in this package, then this package doesn't 19683e03a40Smrgneed to know the machine type. 19783e03a40Smrg 19883e03a40Smrg If you are _building_ compiler tools for cross-compiling, you should 19983e03a40Smrguse the option `--target=TYPE' to select the type of system they will 20083e03a40Smrgproduce code for. 20183e03a40Smrg 20283e03a40Smrg If you want to _use_ a cross compiler, that generates code for a 20383e03a40Smrgplatform different from the build platform, you should specify the 20483e03a40Smrg"host" platform (i.e., that on which the generated programs will 20583e03a40Smrgeventually be run) with `--host=TYPE'. 20683e03a40Smrg 20783e03a40SmrgSharing Defaults 20883e03a40Smrg================ 20983e03a40Smrg 21083e03a40Smrg If you want to set default values for `configure' scripts to share, 21183e03a40Smrgyou can create a site shell script called `config.site' that gives 21283e03a40Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 21383e03a40Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 21483e03a40Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 21583e03a40Smrg`CONFIG_SITE' environment variable to the location of the site script. 21683e03a40SmrgA warning: not all `configure' scripts look for a site script. 21783e03a40Smrg 21883e03a40SmrgDefining Variables 21983e03a40Smrg================== 22083e03a40Smrg 22183e03a40Smrg Variables not defined in a site shell script can be set in the 22283e03a40Smrgenvironment passed to `configure'. However, some packages may run 22383e03a40Smrgconfigure again during the build, and the customized values of these 22483e03a40Smrgvariables may be lost. In order to avoid this problem, you should set 22583e03a40Smrgthem in the `configure' command line, using `VAR=value'. For example: 22683e03a40Smrg 22783e03a40Smrg ./configure CC=/usr/local2/bin/gcc 22883e03a40Smrg 22983e03a40Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 23083e03a40Smrgoverridden in the site shell script). 23183e03a40Smrg 23283e03a40SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23383e03a40Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23483e03a40Smrg 23583e03a40Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23683e03a40Smrg 23783e03a40Smrg`configure' Invocation 23883e03a40Smrg====================== 23983e03a40Smrg 24083e03a40Smrg `configure' recognizes the following options to control how it 24183e03a40Smrgoperates. 24283e03a40Smrg 24383e03a40Smrg`--help' 24483e03a40Smrg`-h' 24583e03a40Smrg Print a summary of all of the options to `configure', and exit. 24683e03a40Smrg 24783e03a40Smrg`--help=short' 24883e03a40Smrg`--help=recursive' 24983e03a40Smrg Print a summary of the options unique to this package's 25083e03a40Smrg `configure', and exit. The `short' variant lists options used 25183e03a40Smrg only in the top level, while the `recursive' variant lists options 25283e03a40Smrg also present in any nested packages. 25383e03a40Smrg 25483e03a40Smrg`--version' 25583e03a40Smrg`-V' 25683e03a40Smrg Print the version of Autoconf used to generate the `configure' 25783e03a40Smrg script, and exit. 25883e03a40Smrg 25983e03a40Smrg`--cache-file=FILE' 26083e03a40Smrg Enable the cache: use and save the results of the tests in FILE, 26183e03a40Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 26283e03a40Smrg disable caching. 26383e03a40Smrg 26483e03a40Smrg`--config-cache' 26583e03a40Smrg`-C' 26683e03a40Smrg Alias for `--cache-file=config.cache'. 26783e03a40Smrg 26883e03a40Smrg`--quiet' 26983e03a40Smrg`--silent' 27083e03a40Smrg`-q' 27183e03a40Smrg Do not print messages saying which checks are being made. To 27283e03a40Smrg suppress all normal output, redirect it to `/dev/null' (any error 27383e03a40Smrg messages will still be shown). 27483e03a40Smrg 27583e03a40Smrg`--srcdir=DIR' 27683e03a40Smrg Look for the package's source code in directory DIR. Usually 27783e03a40Smrg `configure' can determine that directory automatically. 27883e03a40Smrg 27983e03a40Smrg`--prefix=DIR' 28083e03a40Smrg Use DIR as the installation prefix. *Note Installation Names:: 28183e03a40Smrg for more details, including other options available for fine-tuning 28283e03a40Smrg the installation locations. 28383e03a40Smrg 28483e03a40Smrg`--no-create' 28583e03a40Smrg`-n' 28683e03a40Smrg Run the configure checks, but stop before creating any output 28783e03a40Smrg files. 28883e03a40Smrg 28983e03a40Smrg`configure' also accepts some other, not widely useful, options. Run 29083e03a40Smrg`configure --help' for more details. 29183e03a40Smrg 292