INSTALL revision 994689c1
1994689c1SmrgInstallation Instructions 2994689c1Smrg************************* 3994689c1Smrg 4994689c1SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5994689c1Smrg2006, 2007, 2008 Free Software Foundation, Inc. 67a84e134Smrg 77a84e134Smrg This file is free documentation; the Free Software Foundation gives 87a84e134Smrgunlimited permission to copy, distribute and modify it. 97a84e134Smrg 107a84e134SmrgBasic Installation 117a84e134Smrg================== 127a84e134Smrg 13994689c1Smrg Briefly, the shell commands `./configure; make; make install' should 14994689c1Smrgconfigure, build, and install this package. The following 15994689c1Smrgmore-detailed instructions are generic; see the `README' file for 16994689c1Smrginstructions specific to this package. 177a84e134Smrg 187a84e134Smrg The `configure' shell script attempts to guess correct values for 197a84e134Smrgvarious system-dependent variables used during compilation. It uses 207a84e134Smrgthose values to create a `Makefile' in each directory of the package. 217a84e134SmrgIt may also create one or more `.h' files containing system-dependent 227a84e134Smrgdefinitions. Finally, it creates a shell script `config.status' that 237a84e134Smrgyou can run in the future to recreate the current configuration, and a 247a84e134Smrgfile `config.log' containing compiler output (useful mainly for 257a84e134Smrgdebugging `configure'). 267a84e134Smrg 277a84e134Smrg It can also use an optional file (typically called `config.cache' 287a84e134Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29994689c1Smrgthe results of its tests to speed up reconfiguring. Caching is 307a84e134Smrgdisabled by default to prevent problems with accidental use of stale 31994689c1Smrgcache files. 327a84e134Smrg 337a84e134Smrg If you need to do unusual things to compile the package, please try 347a84e134Smrgto figure out how `configure' could check whether to do them, and mail 357a84e134Smrgdiffs or instructions to the address given in the `README' so they can 367a84e134Smrgbe considered for the next release. If you are using the cache, and at 377a84e134Smrgsome point `config.cache' contains results you don't want to keep, you 387a84e134Smrgmay remove or edit it. 397a84e134Smrg 407a84e134Smrg The file `configure.ac' (or `configure.in') is used to create 41994689c1Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42994689c1Smrgyou want to change it or regenerate `configure' using a newer version 43994689c1Smrgof `autoconf'. 447a84e134Smrg 457a84e134SmrgThe simplest way to compile this package is: 467a84e134Smrg 477a84e134Smrg 1. `cd' to the directory containing the package's source code and type 48994689c1Smrg `./configure' to configure the package for your system. 497a84e134Smrg 50994689c1Smrg Running `configure' might take a while. While running, it prints 51994689c1Smrg some messages telling which features it is checking for. 527a84e134Smrg 537a84e134Smrg 2. Type `make' to compile the package. 547a84e134Smrg 557a84e134Smrg 3. Optionally, type `make check' to run any self-tests that come with 567a84e134Smrg the package. 577a84e134Smrg 587a84e134Smrg 4. Type `make install' to install the programs and any data files and 597a84e134Smrg documentation. 607a84e134Smrg 617a84e134Smrg 5. You can remove the program binaries and object files from the 627a84e134Smrg source code directory by typing `make clean'. To also remove the 637a84e134Smrg files that `configure' created (so you can compile the package for 647a84e134Smrg a different kind of computer), type `make distclean'. There is 657a84e134Smrg also a `make maintainer-clean' target, but that is intended mainly 667a84e134Smrg for the package's developers. If you use it, you may have to get 677a84e134Smrg all sorts of other programs in order to regenerate files that came 687a84e134Smrg with the distribution. 697a84e134Smrg 70994689c1Smrg 6. Often, you can also type `make uninstall' to remove the installed 71994689c1Smrg files again. 72994689c1Smrg 737a84e134SmrgCompilers and Options 747a84e134Smrg===================== 757a84e134Smrg 767a84e134Smrg Some systems require unusual options for compilation or linking that 777a84e134Smrgthe `configure' script does not know about. Run `./configure --help' 787a84e134Smrgfor details on some of the pertinent environment variables. 797a84e134Smrg 807a84e134Smrg You can give `configure' initial values for configuration parameters 817a84e134Smrgby setting variables in the command line or in the environment. Here 827a84e134Smrgis an example: 837a84e134Smrg 84994689c1Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 857a84e134Smrg 867a84e134Smrg *Note Defining Variables::, for more details. 877a84e134Smrg 887a84e134SmrgCompiling For Multiple Architectures 897a84e134Smrg==================================== 907a84e134Smrg 917a84e134Smrg You can compile the package for more than one kind of computer at the 927a84e134Smrgsame time, by placing the object files for each architecture in their 93994689c1Smrgown directory. To do this, you can use GNU `make'. `cd' to the 947a84e134Smrgdirectory where you want the object files and executables to go and run 957a84e134Smrgthe `configure' script. `configure' automatically checks for the 967a84e134Smrgsource code in the directory that `configure' is in and in `..'. 977a84e134Smrg 98994689c1Smrg With a non-GNU `make', it is safer to compile the package for one 99994689c1Smrgarchitecture at a time in the source code directory. After you have 100994689c1Smrginstalled the package for one architecture, use `make distclean' before 101994689c1Smrgreconfiguring for another architecture. 102994689c1Smrg 103994689c1Smrg On MacOS X 10.5 and later systems, you can create libraries and 104994689c1Smrgexecutables that work on multiple system types--known as "fat" or 105994689c1Smrg"universal" binaries--by specifying multiple `-arch' options to the 106994689c1Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107994689c1Smrgthis: 108994689c1Smrg 109994689c1Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110994689c1Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111994689c1Smrg CPP="gcc -E" CXXCPP="g++ -E" 112994689c1Smrg 113994689c1Smrg This is not guaranteed to produce working output in all cases, you 114994689c1Smrgmay have to build one architecture at a time and combine the results 115994689c1Smrgusing the `lipo' tool if you have problems. 1167a84e134Smrg 1177a84e134SmrgInstallation Names 1187a84e134Smrg================== 1197a84e134Smrg 120994689c1Smrg By default, `make install' installs the package's commands under 121994689c1Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122994689c1Smrgcan specify an installation prefix other than `/usr/local' by giving 123994689c1Smrg`configure' the option `--prefix=PREFIX'. 1247a84e134Smrg 1257a84e134Smrg You can specify separate installation prefixes for 1267a84e134Smrgarchitecture-specific files and architecture-independent files. If you 127994689c1Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128994689c1SmrgPREFIX as the prefix for installing programs and libraries. 129994689c1SmrgDocumentation and other data files still use the regular prefix. 1307a84e134Smrg 1317a84e134Smrg In addition, if you use an unusual directory layout you can give 132994689c1Smrgoptions like `--bindir=DIR' to specify different values for particular 1337a84e134Smrgkinds of files. Run `configure --help' for a list of the directories 1347a84e134Smrgyou can set and what kinds of files go in them. 1357a84e134Smrg 1367a84e134Smrg If the package supports it, you can cause programs to be installed 1377a84e134Smrgwith an extra prefix or suffix on their names by giving `configure' the 1387a84e134Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1397a84e134Smrg 1407a84e134SmrgOptional Features 1417a84e134Smrg================= 1427a84e134Smrg 1437a84e134Smrg Some packages pay attention to `--enable-FEATURE' options to 1447a84e134Smrg`configure', where FEATURE indicates an optional part of the package. 1457a84e134SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1467a84e134Smrgis something like `gnu-as' or `x' (for the X Window System). The 1477a84e134Smrg`README' should mention any `--enable-' and `--with-' options that the 1487a84e134Smrgpackage recognizes. 1497a84e134Smrg 1507a84e134Smrg For packages that use the X Window System, `configure' can usually 1517a84e134Smrgfind the X include and library files automatically, but if it doesn't, 1527a84e134Smrgyou can use the `configure' options `--x-includes=DIR' and 1537a84e134Smrg`--x-libraries=DIR' to specify their locations. 1547a84e134Smrg 155994689c1SmrgParticular systems 156994689c1Smrg================== 157994689c1Smrg 158994689c1Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159994689c1SmrgCC is not installed, it is recommended to use the following options in 160994689c1Smrgorder to use an ANSI C compiler: 161994689c1Smrg 162994689c1Smrg ./configure CC="cc -Ae" 163994689c1Smrg 164994689c1Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165994689c1Smrg 166994689c1Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167994689c1Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168994689c1Smrga workaround. If GNU CC is not installed, it is therefore recommended 169994689c1Smrgto try 170994689c1Smrg 171994689c1Smrg ./configure CC="cc" 172994689c1Smrg 173994689c1Smrgand if that doesn't work, try 174994689c1Smrg 175994689c1Smrg ./configure CC="cc -nodtk" 176994689c1Smrg 1777a84e134SmrgSpecifying the System Type 1787a84e134Smrg========================== 1797a84e134Smrg 1807a84e134Smrg There may be some features `configure' cannot figure out 1817a84e134Smrgautomatically, but needs to determine by the type of machine the package 1827a84e134Smrgwill run on. Usually, assuming the package is built to be run on the 1837a84e134Smrg_same_ architectures, `configure' can figure that out, but if it prints 1847a84e134Smrga message saying it cannot guess the machine type, give it the 1857a84e134Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1867a84e134Smrgtype, such as `sun4', or a canonical name which has the form: 1877a84e134Smrg 1887a84e134Smrg CPU-COMPANY-SYSTEM 1897a84e134Smrg 1907a84e134Smrgwhere SYSTEM can have one of these forms: 1917a84e134Smrg 1927a84e134Smrg OS KERNEL-OS 1937a84e134Smrg 1947a84e134Smrg See the file `config.sub' for the possible values of each field. If 1957a84e134Smrg`config.sub' isn't included in this package, then this package doesn't 1967a84e134Smrgneed to know the machine type. 1977a84e134Smrg 1987a84e134Smrg If you are _building_ compiler tools for cross-compiling, you should 199994689c1Smrguse the option `--target=TYPE' to select the type of system they will 2007a84e134Smrgproduce code for. 2017a84e134Smrg 2027a84e134Smrg If you want to _use_ a cross compiler, that generates code for a 2037a84e134Smrgplatform different from the build platform, you should specify the 2047a84e134Smrg"host" platform (i.e., that on which the generated programs will 2057a84e134Smrgeventually be run) with `--host=TYPE'. 2067a84e134Smrg 2077a84e134SmrgSharing Defaults 2087a84e134Smrg================ 2097a84e134Smrg 2107a84e134Smrg If you want to set default values for `configure' scripts to share, 2117a84e134Smrgyou can create a site shell script called `config.site' that gives 2127a84e134Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2137a84e134Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2147a84e134Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2157a84e134Smrg`CONFIG_SITE' environment variable to the location of the site script. 2167a84e134SmrgA warning: not all `configure' scripts look for a site script. 2177a84e134Smrg 2187a84e134SmrgDefining Variables 2197a84e134Smrg================== 2207a84e134Smrg 2217a84e134Smrg Variables not defined in a site shell script can be set in the 2227a84e134Smrgenvironment passed to `configure'. However, some packages may run 2237a84e134Smrgconfigure again during the build, and the customized values of these 2247a84e134Smrgvariables may be lost. In order to avoid this problem, you should set 2257a84e134Smrgthem in the `configure' command line, using `VAR=value'. For example: 2267a84e134Smrg 2277a84e134Smrg ./configure CC=/usr/local2/bin/gcc 2287a84e134Smrg 229994689c1Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2307a84e134Smrgoverridden in the site shell script). 2317a84e134Smrg 232994689c1SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233994689c1Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234994689c1Smrg 235994689c1Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236994689c1Smrg 2377a84e134Smrg`configure' Invocation 2387a84e134Smrg====================== 2397a84e134Smrg 2407a84e134Smrg `configure' recognizes the following options to control how it 2417a84e134Smrgoperates. 2427a84e134Smrg 2437a84e134Smrg`--help' 2447a84e134Smrg`-h' 245994689c1Smrg Print a summary of all of the options to `configure', and exit. 246994689c1Smrg 247994689c1Smrg`--help=short' 248994689c1Smrg`--help=recursive' 249994689c1Smrg Print a summary of the options unique to this package's 250994689c1Smrg `configure', and exit. The `short' variant lists options used 251994689c1Smrg only in the top level, while the `recursive' variant lists options 252994689c1Smrg also present in any nested packages. 2537a84e134Smrg 2547a84e134Smrg`--version' 2557a84e134Smrg`-V' 2567a84e134Smrg Print the version of Autoconf used to generate the `configure' 2577a84e134Smrg script, and exit. 2587a84e134Smrg 2597a84e134Smrg`--cache-file=FILE' 2607a84e134Smrg Enable the cache: use and save the results of the tests in FILE, 2617a84e134Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2627a84e134Smrg disable caching. 2637a84e134Smrg 2647a84e134Smrg`--config-cache' 2657a84e134Smrg`-C' 2667a84e134Smrg Alias for `--cache-file=config.cache'. 2677a84e134Smrg 2687a84e134Smrg`--quiet' 2697a84e134Smrg`--silent' 2707a84e134Smrg`-q' 2717a84e134Smrg Do not print messages saying which checks are being made. To 2727a84e134Smrg suppress all normal output, redirect it to `/dev/null' (any error 2737a84e134Smrg messages will still be shown). 2747a84e134Smrg 2757a84e134Smrg`--srcdir=DIR' 2767a84e134Smrg Look for the package's source code in directory DIR. Usually 2777a84e134Smrg `configure' can determine that directory automatically. 2787a84e134Smrg 279994689c1Smrg`--prefix=DIR' 280994689c1Smrg Use DIR as the installation prefix. *Note Installation Names:: 281994689c1Smrg for more details, including other options available for fine-tuning 282994689c1Smrg the installation locations. 283994689c1Smrg 284994689c1Smrg`--no-create' 285994689c1Smrg`-n' 286994689c1Smrg Run the configure checks, but stop before creating any output 287994689c1Smrg files. 288994689c1Smrg 2897a84e134Smrg`configure' also accepts some other, not widely useful, options. Run 2907a84e134Smrg`configure --help' for more details. 2917a84e134Smrg 292