INSTALL revision b4ee4795
1b4ee4795SmrgInstallation Instructions 2b4ee4795Smrg************************* 3b4ee4795Smrg 4b4ee4795SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5b4ee4795Smrg2006, 2007, 2008 Free Software Foundation, Inc. 61ab64890Smrg 71ab64890Smrg This file is free documentation; the Free Software Foundation gives 81ab64890Smrgunlimited permission to copy, distribute and modify it. 91ab64890Smrg 101ab64890SmrgBasic Installation 111ab64890Smrg================== 121ab64890Smrg 13b4ee4795Smrg Briefly, the shell commands `./configure; make; make install' should 14b4ee4795Smrgconfigure, build, and install this package. The following 15b4ee4795Smrgmore-detailed instructions are generic; see the `README' file for 16b4ee4795Smrginstructions specific to this package. 171ab64890Smrg 181ab64890Smrg The `configure' shell script attempts to guess correct values for 191ab64890Smrgvarious system-dependent variables used during compilation. It uses 201ab64890Smrgthose values to create a `Makefile' in each directory of the package. 211ab64890SmrgIt may also create one or more `.h' files containing system-dependent 221ab64890Smrgdefinitions. Finally, it creates a shell script `config.status' that 231ab64890Smrgyou can run in the future to recreate the current configuration, and a 241ab64890Smrgfile `config.log' containing compiler output (useful mainly for 251ab64890Smrgdebugging `configure'). 261ab64890Smrg 271ab64890Smrg It can also use an optional file (typically called `config.cache' 281ab64890Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 29b4ee4795Smrgthe results of its tests to speed up reconfiguring. Caching is 301ab64890Smrgdisabled by default to prevent problems with accidental use of stale 31b4ee4795Smrgcache files. 321ab64890Smrg 331ab64890Smrg If you need to do unusual things to compile the package, please try 341ab64890Smrgto figure out how `configure' could check whether to do them, and mail 351ab64890Smrgdiffs or instructions to the address given in the `README' so they can 361ab64890Smrgbe considered for the next release. If you are using the cache, and at 371ab64890Smrgsome point `config.cache' contains results you don't want to keep, you 381ab64890Smrgmay remove or edit it. 391ab64890Smrg 401ab64890Smrg The file `configure.ac' (or `configure.in') is used to create 41b4ee4795Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 42b4ee4795Smrgyou want to change it or regenerate `configure' using a newer version 43b4ee4795Smrgof `autoconf'. 441ab64890Smrg 451ab64890SmrgThe simplest way to compile this package is: 461ab64890Smrg 471ab64890Smrg 1. `cd' to the directory containing the package's source code and type 48b4ee4795Smrg `./configure' to configure the package for your system. 491ab64890Smrg 50b4ee4795Smrg Running `configure' might take a while. While running, it prints 51b4ee4795Smrg some messages telling which features it is checking for. 521ab64890Smrg 531ab64890Smrg 2. Type `make' to compile the package. 541ab64890Smrg 551ab64890Smrg 3. Optionally, type `make check' to run any self-tests that come with 561ab64890Smrg the package. 571ab64890Smrg 581ab64890Smrg 4. Type `make install' to install the programs and any data files and 591ab64890Smrg documentation. 601ab64890Smrg 611ab64890Smrg 5. You can remove the program binaries and object files from the 621ab64890Smrg source code directory by typing `make clean'. To also remove the 631ab64890Smrg files that `configure' created (so you can compile the package for 641ab64890Smrg a different kind of computer), type `make distclean'. There is 651ab64890Smrg also a `make maintainer-clean' target, but that is intended mainly 661ab64890Smrg for the package's developers. If you use it, you may have to get 671ab64890Smrg all sorts of other programs in order to regenerate files that came 681ab64890Smrg with the distribution. 691ab64890Smrg 70b4ee4795Smrg 6. Often, you can also type `make uninstall' to remove the installed 71b4ee4795Smrg files again. 72b4ee4795Smrg 731ab64890SmrgCompilers and Options 741ab64890Smrg===================== 751ab64890Smrg 761ab64890Smrg Some systems require unusual options for compilation or linking that 771ab64890Smrgthe `configure' script does not know about. Run `./configure --help' 781ab64890Smrgfor details on some of the pertinent environment variables. 791ab64890Smrg 801ab64890Smrg You can give `configure' initial values for configuration parameters 811ab64890Smrgby setting variables in the command line or in the environment. Here 821ab64890Smrgis an example: 831ab64890Smrg 84b4ee4795Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 851ab64890Smrg 861ab64890Smrg *Note Defining Variables::, for more details. 871ab64890Smrg 881ab64890SmrgCompiling For Multiple Architectures 891ab64890Smrg==================================== 901ab64890Smrg 911ab64890Smrg You can compile the package for more than one kind of computer at the 921ab64890Smrgsame time, by placing the object files for each architecture in their 93b4ee4795Smrgown directory. To do this, you can use GNU `make'. `cd' to the 941ab64890Smrgdirectory where you want the object files and executables to go and run 951ab64890Smrgthe `configure' script. `configure' automatically checks for the 961ab64890Smrgsource code in the directory that `configure' is in and in `..'. 971ab64890Smrg 98b4ee4795Smrg With a non-GNU `make', it is safer to compile the package for one 99b4ee4795Smrgarchitecture at a time in the source code directory. After you have 100b4ee4795Smrginstalled the package for one architecture, use `make distclean' before 101b4ee4795Smrgreconfiguring for another architecture. 102b4ee4795Smrg 103b4ee4795Smrg On MacOS X 10.5 and later systems, you can create libraries and 104b4ee4795Smrgexecutables that work on multiple system types--known as "fat" or 105b4ee4795Smrg"universal" binaries--by specifying multiple `-arch' options to the 106b4ee4795Smrgcompiler but only a single `-arch' option to the preprocessor. Like 107b4ee4795Smrgthis: 108b4ee4795Smrg 109b4ee4795Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110b4ee4795Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111b4ee4795Smrg CPP="gcc -E" CXXCPP="g++ -E" 112b4ee4795Smrg 113b4ee4795Smrg This is not guaranteed to produce working output in all cases, you 114b4ee4795Smrgmay have to build one architecture at a time and combine the results 115b4ee4795Smrgusing the `lipo' tool if you have problems. 1161ab64890Smrg 1171ab64890SmrgInstallation Names 1181ab64890Smrg================== 1191ab64890Smrg 120b4ee4795Smrg By default, `make install' installs the package's commands under 121b4ee4795Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 122b4ee4795Smrgcan specify an installation prefix other than `/usr/local' by giving 123b4ee4795Smrg`configure' the option `--prefix=PREFIX'. 1241ab64890Smrg 1251ab64890Smrg You can specify separate installation prefixes for 1261ab64890Smrgarchitecture-specific files and architecture-independent files. If you 127b4ee4795Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 128b4ee4795SmrgPREFIX as the prefix for installing programs and libraries. 129b4ee4795SmrgDocumentation and other data files still use the regular prefix. 1301ab64890Smrg 1311ab64890Smrg In addition, if you use an unusual directory layout you can give 132b4ee4795Smrgoptions like `--bindir=DIR' to specify different values for particular 1331ab64890Smrgkinds of files. Run `configure --help' for a list of the directories 1341ab64890Smrgyou can set and what kinds of files go in them. 1351ab64890Smrg 1361ab64890Smrg If the package supports it, you can cause programs to be installed 1371ab64890Smrgwith an extra prefix or suffix on their names by giving `configure' the 1381ab64890Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1391ab64890Smrg 1401ab64890SmrgOptional Features 1411ab64890Smrg================= 1421ab64890Smrg 1431ab64890Smrg Some packages pay attention to `--enable-FEATURE' options to 1441ab64890Smrg`configure', where FEATURE indicates an optional part of the package. 1451ab64890SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1461ab64890Smrgis something like `gnu-as' or `x' (for the X Window System). The 1471ab64890Smrg`README' should mention any `--enable-' and `--with-' options that the 1481ab64890Smrgpackage recognizes. 1491ab64890Smrg 1501ab64890Smrg For packages that use the X Window System, `configure' can usually 1511ab64890Smrgfind the X include and library files automatically, but if it doesn't, 1521ab64890Smrgyou can use the `configure' options `--x-includes=DIR' and 1531ab64890Smrg`--x-libraries=DIR' to specify their locations. 1541ab64890Smrg 155b4ee4795SmrgParticular systems 156b4ee4795Smrg================== 157b4ee4795Smrg 158b4ee4795Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159b4ee4795SmrgCC is not installed, it is recommended to use the following options in 160b4ee4795Smrgorder to use an ANSI C compiler: 161b4ee4795Smrg 162b4ee4795Smrg ./configure CC="cc -Ae" 163b4ee4795Smrg 164b4ee4795Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165b4ee4795Smrg 166b4ee4795Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167b4ee4795Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168b4ee4795Smrga workaround. If GNU CC is not installed, it is therefore recommended 169b4ee4795Smrgto try 170b4ee4795Smrg 171b4ee4795Smrg ./configure CC="cc" 172b4ee4795Smrg 173b4ee4795Smrgand if that doesn't work, try 174b4ee4795Smrg 175b4ee4795Smrg ./configure CC="cc -nodtk" 176b4ee4795Smrg 1771ab64890SmrgSpecifying the System Type 1781ab64890Smrg========================== 1791ab64890Smrg 1801ab64890Smrg There may be some features `configure' cannot figure out 1811ab64890Smrgautomatically, but needs to determine by the type of machine the package 1821ab64890Smrgwill run on. Usually, assuming the package is built to be run on the 1831ab64890Smrg_same_ architectures, `configure' can figure that out, but if it prints 1841ab64890Smrga message saying it cannot guess the machine type, give it the 1851ab64890Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1861ab64890Smrgtype, such as `sun4', or a canonical name which has the form: 1871ab64890Smrg 1881ab64890Smrg CPU-COMPANY-SYSTEM 1891ab64890Smrg 1901ab64890Smrgwhere SYSTEM can have one of these forms: 1911ab64890Smrg 1921ab64890Smrg OS KERNEL-OS 1931ab64890Smrg 1941ab64890Smrg See the file `config.sub' for the possible values of each field. If 1951ab64890Smrg`config.sub' isn't included in this package, then this package doesn't 1961ab64890Smrgneed to know the machine type. 1971ab64890Smrg 1981ab64890Smrg If you are _building_ compiler tools for cross-compiling, you should 199b4ee4795Smrguse the option `--target=TYPE' to select the type of system they will 2001ab64890Smrgproduce code for. 2011ab64890Smrg 2021ab64890Smrg If you want to _use_ a cross compiler, that generates code for a 2031ab64890Smrgplatform different from the build platform, you should specify the 2041ab64890Smrg"host" platform (i.e., that on which the generated programs will 2051ab64890Smrgeventually be run) with `--host=TYPE'. 2061ab64890Smrg 2071ab64890SmrgSharing Defaults 2081ab64890Smrg================ 2091ab64890Smrg 2101ab64890Smrg If you want to set default values for `configure' scripts to share, 2111ab64890Smrgyou can create a site shell script called `config.site' that gives 2121ab64890Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2131ab64890Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2141ab64890Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2151ab64890Smrg`CONFIG_SITE' environment variable to the location of the site script. 2161ab64890SmrgA warning: not all `configure' scripts look for a site script. 2171ab64890Smrg 2181ab64890SmrgDefining Variables 2191ab64890Smrg================== 2201ab64890Smrg 2211ab64890Smrg Variables not defined in a site shell script can be set in the 2221ab64890Smrgenvironment passed to `configure'. However, some packages may run 2231ab64890Smrgconfigure again during the build, and the customized values of these 2241ab64890Smrgvariables may be lost. In order to avoid this problem, you should set 2251ab64890Smrgthem in the `configure' command line, using `VAR=value'. For example: 2261ab64890Smrg 2271ab64890Smrg ./configure CC=/usr/local2/bin/gcc 2281ab64890Smrg 229b4ee4795Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2301ab64890Smrgoverridden in the site shell script). 2311ab64890Smrg 232b4ee4795SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 233b4ee4795Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 234b4ee4795Smrg 235b4ee4795Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 236b4ee4795Smrg 2371ab64890Smrg`configure' Invocation 2381ab64890Smrg====================== 2391ab64890Smrg 2401ab64890Smrg `configure' recognizes the following options to control how it 2411ab64890Smrgoperates. 2421ab64890Smrg 2431ab64890Smrg`--help' 2441ab64890Smrg`-h' 245b4ee4795Smrg Print a summary of all of the options to `configure', and exit. 246b4ee4795Smrg 247b4ee4795Smrg`--help=short' 248b4ee4795Smrg`--help=recursive' 249b4ee4795Smrg Print a summary of the options unique to this package's 250b4ee4795Smrg `configure', and exit. The `short' variant lists options used 251b4ee4795Smrg only in the top level, while the `recursive' variant lists options 252b4ee4795Smrg also present in any nested packages. 2531ab64890Smrg 2541ab64890Smrg`--version' 2551ab64890Smrg`-V' 2561ab64890Smrg Print the version of Autoconf used to generate the `configure' 2571ab64890Smrg script, and exit. 2581ab64890Smrg 2591ab64890Smrg`--cache-file=FILE' 2601ab64890Smrg Enable the cache: use and save the results of the tests in FILE, 2611ab64890Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2621ab64890Smrg disable caching. 2631ab64890Smrg 2641ab64890Smrg`--config-cache' 2651ab64890Smrg`-C' 2661ab64890Smrg Alias for `--cache-file=config.cache'. 2671ab64890Smrg 2681ab64890Smrg`--quiet' 2691ab64890Smrg`--silent' 2701ab64890Smrg`-q' 2711ab64890Smrg Do not print messages saying which checks are being made. To 2721ab64890Smrg suppress all normal output, redirect it to `/dev/null' (any error 2731ab64890Smrg messages will still be shown). 2741ab64890Smrg 2751ab64890Smrg`--srcdir=DIR' 2761ab64890Smrg Look for the package's source code in directory DIR. Usually 2771ab64890Smrg `configure' can determine that directory automatically. 2781ab64890Smrg 279b4ee4795Smrg`--prefix=DIR' 280b4ee4795Smrg Use DIR as the installation prefix. *Note Installation Names:: 281b4ee4795Smrg for more details, including other options available for fine-tuning 282b4ee4795Smrg the installation locations. 283b4ee4795Smrg 284b4ee4795Smrg`--no-create' 285b4ee4795Smrg`-n' 286b4ee4795Smrg Run the configure checks, but stop before creating any output 287b4ee4795Smrg files. 288b4ee4795Smrg 2891ab64890Smrg`configure' also accepts some other, not widely useful, options. Run 2901ab64890Smrg`configure --help' for more details. 2911ab64890Smrg 292