INSTALL revision 2adc0320
12adc0320SmrgInstallation Instructions 22adc0320Smrg************************* 32adc0320Smrg 42adc0320SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 52adc0320Smrg2006, 2007, 2008 Free Software Foundation, Inc. 62adc0320Smrg 72adc0320Smrg This file is free documentation; the Free Software Foundation gives 82adc0320Smrgunlimited permission to copy, distribute and modify it. 92adc0320Smrg 102adc0320SmrgBasic Installation 112adc0320Smrg================== 122adc0320Smrg 132adc0320Smrg Briefly, the shell commands `./configure; make; make install' should 142adc0320Smrgconfigure, build, and install this package. The following 152adc0320Smrgmore-detailed instructions are generic; see the `README' file for 162adc0320Smrginstructions specific to this package. 172adc0320Smrg 182adc0320Smrg The `configure' shell script attempts to guess correct values for 192adc0320Smrgvarious system-dependent variables used during compilation. It uses 202adc0320Smrgthose values to create a `Makefile' in each directory of the package. 212adc0320SmrgIt may also create one or more `.h' files containing system-dependent 222adc0320Smrgdefinitions. Finally, it creates a shell script `config.status' that 232adc0320Smrgyou can run in the future to recreate the current configuration, and a 242adc0320Smrgfile `config.log' containing compiler output (useful mainly for 252adc0320Smrgdebugging `configure'). 262adc0320Smrg 272adc0320Smrg It can also use an optional file (typically called `config.cache' 282adc0320Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 292adc0320Smrgthe results of its tests to speed up reconfiguring. Caching is 302adc0320Smrgdisabled by default to prevent problems with accidental use of stale 312adc0320Smrgcache files. 322adc0320Smrg 332adc0320Smrg If you need to do unusual things to compile the package, please try 342adc0320Smrgto figure out how `configure' could check whether to do them, and mail 352adc0320Smrgdiffs or instructions to the address given in the `README' so they can 362adc0320Smrgbe considered for the next release. If you are using the cache, and at 372adc0320Smrgsome point `config.cache' contains results you don't want to keep, you 382adc0320Smrgmay remove or edit it. 392adc0320Smrg 402adc0320Smrg The file `configure.ac' (or `configure.in') is used to create 412adc0320Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 422adc0320Smrgyou want to change it or regenerate `configure' using a newer version 432adc0320Smrgof `autoconf'. 442adc0320Smrg 452adc0320SmrgThe simplest way to compile this package is: 462adc0320Smrg 472adc0320Smrg 1. `cd' to the directory containing the package's source code and type 482adc0320Smrg `./configure' to configure the package for your system. 492adc0320Smrg 502adc0320Smrg Running `configure' might take a while. While running, it prints 512adc0320Smrg some messages telling which features it is checking for. 522adc0320Smrg 532adc0320Smrg 2. Type `make' to compile the package. 542adc0320Smrg 552adc0320Smrg 3. Optionally, type `make check' to run any self-tests that come with 562adc0320Smrg the package. 572adc0320Smrg 582adc0320Smrg 4. Type `make install' to install the programs and any data files and 592adc0320Smrg documentation. 602adc0320Smrg 612adc0320Smrg 5. You can remove the program binaries and object files from the 622adc0320Smrg source code directory by typing `make clean'. To also remove the 632adc0320Smrg files that `configure' created (so you can compile the package for 642adc0320Smrg a different kind of computer), type `make distclean'. There is 652adc0320Smrg also a `make maintainer-clean' target, but that is intended mainly 662adc0320Smrg for the package's developers. If you use it, you may have to get 672adc0320Smrg all sorts of other programs in order to regenerate files that came 682adc0320Smrg with the distribution. 692adc0320Smrg 702adc0320Smrg 6. Often, you can also type `make uninstall' to remove the installed 712adc0320Smrg files again. 722adc0320Smrg 732adc0320SmrgCompilers and Options 742adc0320Smrg===================== 752adc0320Smrg 762adc0320Smrg Some systems require unusual options for compilation or linking that 772adc0320Smrgthe `configure' script does not know about. Run `./configure --help' 782adc0320Smrgfor details on some of the pertinent environment variables. 792adc0320Smrg 802adc0320Smrg You can give `configure' initial values for configuration parameters 812adc0320Smrgby setting variables in the command line or in the environment. Here 822adc0320Smrgis an example: 832adc0320Smrg 842adc0320Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 852adc0320Smrg 862adc0320Smrg *Note Defining Variables::, for more details. 872adc0320Smrg 882adc0320SmrgCompiling For Multiple Architectures 892adc0320Smrg==================================== 902adc0320Smrg 912adc0320Smrg You can compile the package for more than one kind of computer at the 922adc0320Smrgsame time, by placing the object files for each architecture in their 932adc0320Smrgown directory. To do this, you can use GNU `make'. `cd' to the 942adc0320Smrgdirectory where you want the object files and executables to go and run 952adc0320Smrgthe `configure' script. `configure' automatically checks for the 962adc0320Smrgsource code in the directory that `configure' is in and in `..'. 972adc0320Smrg 982adc0320Smrg With a non-GNU `make', it is safer to compile the package for one 992adc0320Smrgarchitecture at a time in the source code directory. After you have 1002adc0320Smrginstalled the package for one architecture, use `make distclean' before 1012adc0320Smrgreconfiguring for another architecture. 1022adc0320Smrg 1032adc0320Smrg On MacOS X 10.5 and later systems, you can create libraries and 1042adc0320Smrgexecutables that work on multiple system types--known as "fat" or 1052adc0320Smrg"universal" binaries--by specifying multiple `-arch' options to the 1062adc0320Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1072adc0320Smrgthis: 1082adc0320Smrg 1092adc0320Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1102adc0320Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1112adc0320Smrg CPP="gcc -E" CXXCPP="g++ -E" 1122adc0320Smrg 1132adc0320Smrg This is not guaranteed to produce working output in all cases, you 1142adc0320Smrgmay have to build one architecture at a time and combine the results 1152adc0320Smrgusing the `lipo' tool if you have problems. 1162adc0320Smrg 1172adc0320SmrgInstallation Names 1182adc0320Smrg================== 1192adc0320Smrg 1202adc0320Smrg By default, `make install' installs the package's commands under 1212adc0320Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1222adc0320Smrgcan specify an installation prefix other than `/usr/local' by giving 1232adc0320Smrg`configure' the option `--prefix=PREFIX'. 1242adc0320Smrg 1252adc0320Smrg You can specify separate installation prefixes for 1262adc0320Smrgarchitecture-specific files and architecture-independent files. If you 1272adc0320Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1282adc0320SmrgPREFIX as the prefix for installing programs and libraries. 1292adc0320SmrgDocumentation and other data files still use the regular prefix. 1302adc0320Smrg 1312adc0320Smrg In addition, if you use an unusual directory layout you can give 1322adc0320Smrgoptions like `--bindir=DIR' to specify different values for particular 1332adc0320Smrgkinds of files. Run `configure --help' for a list of the directories 1342adc0320Smrgyou can set and what kinds of files go in them. 1352adc0320Smrg 1362adc0320Smrg If the package supports it, you can cause programs to be installed 1372adc0320Smrgwith an extra prefix or suffix on their names by giving `configure' the 1382adc0320Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1392adc0320Smrg 1402adc0320SmrgOptional Features 1412adc0320Smrg================= 1422adc0320Smrg 1432adc0320Smrg Some packages pay attention to `--enable-FEATURE' options to 1442adc0320Smrg`configure', where FEATURE indicates an optional part of the package. 1452adc0320SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1462adc0320Smrgis something like `gnu-as' or `x' (for the X Window System). The 1472adc0320Smrg`README' should mention any `--enable-' and `--with-' options that the 1482adc0320Smrgpackage recognizes. 1492adc0320Smrg 1502adc0320Smrg For packages that use the X Window System, `configure' can usually 1512adc0320Smrgfind the X include and library files automatically, but if it doesn't, 1522adc0320Smrgyou can use the `configure' options `--x-includes=DIR' and 1532adc0320Smrg`--x-libraries=DIR' to specify their locations. 1542adc0320Smrg 1552adc0320SmrgParticular systems 1562adc0320Smrg================== 1572adc0320Smrg 1582adc0320Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1592adc0320SmrgCC is not installed, it is recommended to use the following options in 1602adc0320Smrgorder to use an ANSI C compiler: 1612adc0320Smrg 1622adc0320Smrg ./configure CC="cc -Ae" 1632adc0320Smrg 1642adc0320Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1652adc0320Smrg 1662adc0320Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1672adc0320Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1682adc0320Smrga workaround. If GNU CC is not installed, it is therefore recommended 1692adc0320Smrgto try 1702adc0320Smrg 1712adc0320Smrg ./configure CC="cc" 1722adc0320Smrg 1732adc0320Smrgand if that doesn't work, try 1742adc0320Smrg 1752adc0320Smrg ./configure CC="cc -nodtk" 1762adc0320Smrg 1772adc0320SmrgSpecifying the System Type 1782adc0320Smrg========================== 1792adc0320Smrg 1802adc0320Smrg There may be some features `configure' cannot figure out 1812adc0320Smrgautomatically, but needs to determine by the type of machine the package 1822adc0320Smrgwill run on. Usually, assuming the package is built to be run on the 1832adc0320Smrg_same_ architectures, `configure' can figure that out, but if it prints 1842adc0320Smrga message saying it cannot guess the machine type, give it the 1852adc0320Smrg`--build=TYPE' option. TYPE can either be a short name for the system 1862adc0320Smrgtype, such as `sun4', or a canonical name which has the form: 1872adc0320Smrg 1882adc0320Smrg CPU-COMPANY-SYSTEM 1892adc0320Smrg 1902adc0320Smrgwhere SYSTEM can have one of these forms: 1912adc0320Smrg 1922adc0320Smrg OS KERNEL-OS 1932adc0320Smrg 1942adc0320Smrg See the file `config.sub' for the possible values of each field. If 1952adc0320Smrg`config.sub' isn't included in this package, then this package doesn't 1962adc0320Smrgneed to know the machine type. 1972adc0320Smrg 1982adc0320Smrg If you are _building_ compiler tools for cross-compiling, you should 1992adc0320Smrguse the option `--target=TYPE' to select the type of system they will 2002adc0320Smrgproduce code for. 2012adc0320Smrg 2022adc0320Smrg If you want to _use_ a cross compiler, that generates code for a 2032adc0320Smrgplatform different from the build platform, you should specify the 2042adc0320Smrg"host" platform (i.e., that on which the generated programs will 2052adc0320Smrgeventually be run) with `--host=TYPE'. 2062adc0320Smrg 2072adc0320SmrgSharing Defaults 2082adc0320Smrg================ 2092adc0320Smrg 2102adc0320Smrg If you want to set default values for `configure' scripts to share, 2112adc0320Smrgyou can create a site shell script called `config.site' that gives 2122adc0320Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2132adc0320Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2142adc0320Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2152adc0320Smrg`CONFIG_SITE' environment variable to the location of the site script. 2162adc0320SmrgA warning: not all `configure' scripts look for a site script. 2172adc0320Smrg 2182adc0320SmrgDefining Variables 2192adc0320Smrg================== 2202adc0320Smrg 2212adc0320Smrg Variables not defined in a site shell script can be set in the 2222adc0320Smrgenvironment passed to `configure'. However, some packages may run 2232adc0320Smrgconfigure again during the build, and the customized values of these 2242adc0320Smrgvariables may be lost. In order to avoid this problem, you should set 2252adc0320Smrgthem in the `configure' command line, using `VAR=value'. For example: 2262adc0320Smrg 2272adc0320Smrg ./configure CC=/usr/local2/bin/gcc 2282adc0320Smrg 2292adc0320Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 2302adc0320Smrgoverridden in the site shell script). 2312adc0320Smrg 2322adc0320SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2332adc0320Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 2342adc0320Smrg 2352adc0320Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2362adc0320Smrg 2372adc0320Smrg`configure' Invocation 2382adc0320Smrg====================== 2392adc0320Smrg 2402adc0320Smrg `configure' recognizes the following options to control how it 2412adc0320Smrgoperates. 2422adc0320Smrg 2432adc0320Smrg`--help' 2442adc0320Smrg`-h' 2452adc0320Smrg Print a summary of all of the options to `configure', and exit. 2462adc0320Smrg 2472adc0320Smrg`--help=short' 2482adc0320Smrg`--help=recursive' 2492adc0320Smrg Print a summary of the options unique to this package's 2502adc0320Smrg `configure', and exit. The `short' variant lists options used 2512adc0320Smrg only in the top level, while the `recursive' variant lists options 2522adc0320Smrg also present in any nested packages. 2532adc0320Smrg 2542adc0320Smrg`--version' 2552adc0320Smrg`-V' 2562adc0320Smrg Print the version of Autoconf used to generate the `configure' 2572adc0320Smrg script, and exit. 2582adc0320Smrg 2592adc0320Smrg`--cache-file=FILE' 2602adc0320Smrg Enable the cache: use and save the results of the tests in FILE, 2612adc0320Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 2622adc0320Smrg disable caching. 2632adc0320Smrg 2642adc0320Smrg`--config-cache' 2652adc0320Smrg`-C' 2662adc0320Smrg Alias for `--cache-file=config.cache'. 2672adc0320Smrg 2682adc0320Smrg`--quiet' 2692adc0320Smrg`--silent' 2702adc0320Smrg`-q' 2712adc0320Smrg Do not print messages saying which checks are being made. To 2722adc0320Smrg suppress all normal output, redirect it to `/dev/null' (any error 2732adc0320Smrg messages will still be shown). 2742adc0320Smrg 2752adc0320Smrg`--srcdir=DIR' 2762adc0320Smrg Look for the package's source code in directory DIR. Usually 2772adc0320Smrg `configure' can determine that directory automatically. 2782adc0320Smrg 2792adc0320Smrg`--prefix=DIR' 2802adc0320Smrg Use DIR as the installation prefix. *Note Installation Names:: 2812adc0320Smrg for more details, including other options available for fine-tuning 2822adc0320Smrg the installation locations. 2832adc0320Smrg 2842adc0320Smrg`--no-create' 2852adc0320Smrg`-n' 2862adc0320Smrg Run the configure checks, but stop before creating any output 2872adc0320Smrg files. 2882adc0320Smrg 2892adc0320Smrg`configure' also accepts some other, not widely useful, options. Run 2902adc0320Smrg`configure --help' for more details. 2912adc0320Smrg 292