INSTALL revision 56957a04
156957a04SmrgInstallation Instructions 256957a04Smrg************************* 356957a04Smrg 456957a04SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 556957a04Smrg2006, 2007, 2008 Free Software Foundation, Inc. 656957a04Smrg 756957a04Smrg This file is free documentation; the Free Software Foundation gives 856957a04Smrgunlimited permission to copy, distribute and modify it. 956957a04Smrg 1056957a04SmrgBasic Installation 1156957a04Smrg================== 1256957a04Smrg 1356957a04Smrg Briefly, the shell commands `./configure; make; make install' should 1456957a04Smrgconfigure, build, and install this package. The following 1556957a04Smrgmore-detailed instructions are generic; see the `README' file for 1656957a04Smrginstructions specific to this package. 1756957a04Smrg 1856957a04Smrg The `configure' shell script attempts to guess correct values for 1956957a04Smrgvarious system-dependent variables used during compilation. It uses 2056957a04Smrgthose values to create a `Makefile' in each directory of the package. 2156957a04SmrgIt may also create one or more `.h' files containing system-dependent 2256957a04Smrgdefinitions. Finally, it creates a shell script `config.status' that 2356957a04Smrgyou can run in the future to recreate the current configuration, and a 2456957a04Smrgfile `config.log' containing compiler output (useful mainly for 2556957a04Smrgdebugging `configure'). 2656957a04Smrg 2756957a04Smrg It can also use an optional file (typically called `config.cache' 2856957a04Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 2956957a04Smrgthe results of its tests to speed up reconfiguring. Caching is 3056957a04Smrgdisabled by default to prevent problems with accidental use of stale 3156957a04Smrgcache files. 3256957a04Smrg 3356957a04Smrg If you need to do unusual things to compile the package, please try 3456957a04Smrgto figure out how `configure' could check whether to do them, and mail 3556957a04Smrgdiffs or instructions to the address given in the `README' so they can 3656957a04Smrgbe considered for the next release. If you are using the cache, and at 3756957a04Smrgsome point `config.cache' contains results you don't want to keep, you 3856957a04Smrgmay remove or edit it. 3956957a04Smrg 4056957a04Smrg The file `configure.ac' (or `configure.in') is used to create 4156957a04Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4256957a04Smrgyou want to change it or regenerate `configure' using a newer version 4356957a04Smrgof `autoconf'. 4456957a04Smrg 4556957a04SmrgThe simplest way to compile this package is: 4656957a04Smrg 4756957a04Smrg 1. `cd' to the directory containing the package's source code and type 4856957a04Smrg `./configure' to configure the package for your system. 4956957a04Smrg 5056957a04Smrg Running `configure' might take a while. While running, it prints 5156957a04Smrg some messages telling which features it is checking for. 5256957a04Smrg 5356957a04Smrg 2. Type `make' to compile the package. 5456957a04Smrg 5556957a04Smrg 3. Optionally, type `make check' to run any self-tests that come with 5656957a04Smrg the package. 5756957a04Smrg 5856957a04Smrg 4. Type `make install' to install the programs and any data files and 5956957a04Smrg documentation. 6056957a04Smrg 6156957a04Smrg 5. You can remove the program binaries and object files from the 6256957a04Smrg source code directory by typing `make clean'. To also remove the 6356957a04Smrg files that `configure' created (so you can compile the package for 6456957a04Smrg a different kind of computer), type `make distclean'. There is 6556957a04Smrg also a `make maintainer-clean' target, but that is intended mainly 6656957a04Smrg for the package's developers. If you use it, you may have to get 6756957a04Smrg all sorts of other programs in order to regenerate files that came 6856957a04Smrg with the distribution. 6956957a04Smrg 7056957a04Smrg 6. Often, you can also type `make uninstall' to remove the installed 7156957a04Smrg files again. 7256957a04Smrg 7356957a04SmrgCompilers and Options 7456957a04Smrg===================== 7556957a04Smrg 7656957a04Smrg Some systems require unusual options for compilation or linking that 7756957a04Smrgthe `configure' script does not know about. Run `./configure --help' 7856957a04Smrgfor details on some of the pertinent environment variables. 7956957a04Smrg 8056957a04Smrg You can give `configure' initial values for configuration parameters 8156957a04Smrgby setting variables in the command line or in the environment. Here 8256957a04Smrgis an example: 8356957a04Smrg 8456957a04Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 8556957a04Smrg 8656957a04Smrg *Note Defining Variables::, for more details. 8756957a04Smrg 8856957a04SmrgCompiling For Multiple Architectures 8956957a04Smrg==================================== 9056957a04Smrg 9156957a04Smrg You can compile the package for more than one kind of computer at the 9256957a04Smrgsame time, by placing the object files for each architecture in their 9356957a04Smrgown directory. To do this, you can use GNU `make'. `cd' to the 9456957a04Smrgdirectory where you want the object files and executables to go and run 9556957a04Smrgthe `configure' script. `configure' automatically checks for the 9656957a04Smrgsource code in the directory that `configure' is in and in `..'. 9756957a04Smrg 9856957a04Smrg With a non-GNU `make', it is safer to compile the package for one 9956957a04Smrgarchitecture at a time in the source code directory. After you have 10056957a04Smrginstalled the package for one architecture, use `make distclean' before 10156957a04Smrgreconfiguring for another architecture. 10256957a04Smrg 10356957a04Smrg On MacOS X 10.5 and later systems, you can create libraries and 10456957a04Smrgexecutables that work on multiple system types--known as "fat" or 10556957a04Smrg"universal" binaries--by specifying multiple `-arch' options to the 10656957a04Smrgcompiler but only a single `-arch' option to the preprocessor. Like 10756957a04Smrgthis: 10856957a04Smrg 10956957a04Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11056957a04Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 11156957a04Smrg CPP="gcc -E" CXXCPP="g++ -E" 11256957a04Smrg 11356957a04Smrg This is not guaranteed to produce working output in all cases, you 11456957a04Smrgmay have to build one architecture at a time and combine the results 11556957a04Smrgusing the `lipo' tool if you have problems. 11656957a04Smrg 11756957a04SmrgInstallation Names 11856957a04Smrg================== 11956957a04Smrg 12056957a04Smrg By default, `make install' installs the package's commands under 12156957a04Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 12256957a04Smrgcan specify an installation prefix other than `/usr/local' by giving 12356957a04Smrg`configure' the option `--prefix=PREFIX'. 12456957a04Smrg 12556957a04Smrg You can specify separate installation prefixes for 12656957a04Smrgarchitecture-specific files and architecture-independent files. If you 12756957a04Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 12856957a04SmrgPREFIX as the prefix for installing programs and libraries. 12956957a04SmrgDocumentation and other data files still use the regular prefix. 13056957a04Smrg 13156957a04Smrg In addition, if you use an unusual directory layout you can give 13256957a04Smrgoptions like `--bindir=DIR' to specify different values for particular 13356957a04Smrgkinds of files. Run `configure --help' for a list of the directories 13456957a04Smrgyou can set and what kinds of files go in them. 13556957a04Smrg 13656957a04Smrg If the package supports it, you can cause programs to be installed 13756957a04Smrgwith an extra prefix or suffix on their names by giving `configure' the 13856957a04Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 13956957a04Smrg 14056957a04SmrgOptional Features 14156957a04Smrg================= 14256957a04Smrg 14356957a04Smrg Some packages pay attention to `--enable-FEATURE' options to 14456957a04Smrg`configure', where FEATURE indicates an optional part of the package. 14556957a04SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 14656957a04Smrgis something like `gnu-as' or `x' (for the X Window System). The 14756957a04Smrg`README' should mention any `--enable-' and `--with-' options that the 14856957a04Smrgpackage recognizes. 14956957a04Smrg 15056957a04Smrg For packages that use the X Window System, `configure' can usually 15156957a04Smrgfind the X include and library files automatically, but if it doesn't, 15256957a04Smrgyou can use the `configure' options `--x-includes=DIR' and 15356957a04Smrg`--x-libraries=DIR' to specify their locations. 15456957a04Smrg 15556957a04SmrgParticular systems 15656957a04Smrg================== 15756957a04Smrg 15856957a04Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 15956957a04SmrgCC is not installed, it is recommended to use the following options in 16056957a04Smrgorder to use an ANSI C compiler: 16156957a04Smrg 16256957a04Smrg ./configure CC="cc -Ae" 16356957a04Smrg 16456957a04Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 16556957a04Smrg 16656957a04Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 16756957a04Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 16856957a04Smrga workaround. If GNU CC is not installed, it is therefore recommended 16956957a04Smrgto try 17056957a04Smrg 17156957a04Smrg ./configure CC="cc" 17256957a04Smrg 17356957a04Smrgand if that doesn't work, try 17456957a04Smrg 17556957a04Smrg ./configure CC="cc -nodtk" 17656957a04Smrg 17756957a04SmrgSpecifying the System Type 17856957a04Smrg========================== 17956957a04Smrg 18056957a04Smrg There may be some features `configure' cannot figure out 18156957a04Smrgautomatically, but needs to determine by the type of machine the package 18256957a04Smrgwill run on. Usually, assuming the package is built to be run on the 18356957a04Smrg_same_ architectures, `configure' can figure that out, but if it prints 18456957a04Smrga message saying it cannot guess the machine type, give it the 18556957a04Smrg`--build=TYPE' option. TYPE can either be a short name for the system 18656957a04Smrgtype, such as `sun4', or a canonical name which has the form: 18756957a04Smrg 18856957a04Smrg CPU-COMPANY-SYSTEM 18956957a04Smrg 19056957a04Smrgwhere SYSTEM can have one of these forms: 19156957a04Smrg 19256957a04Smrg OS KERNEL-OS 19356957a04Smrg 19456957a04Smrg See the file `config.sub' for the possible values of each field. If 19556957a04Smrg`config.sub' isn't included in this package, then this package doesn't 19656957a04Smrgneed to know the machine type. 19756957a04Smrg 19856957a04Smrg If you are _building_ compiler tools for cross-compiling, you should 19956957a04Smrguse the option `--target=TYPE' to select the type of system they will 20056957a04Smrgproduce code for. 20156957a04Smrg 20256957a04Smrg If you want to _use_ a cross compiler, that generates code for a 20356957a04Smrgplatform different from the build platform, you should specify the 20456957a04Smrg"host" platform (i.e., that on which the generated programs will 20556957a04Smrgeventually be run) with `--host=TYPE'. 20656957a04Smrg 20756957a04SmrgSharing Defaults 20856957a04Smrg================ 20956957a04Smrg 21056957a04Smrg If you want to set default values for `configure' scripts to share, 21156957a04Smrgyou can create a site shell script called `config.site' that gives 21256957a04Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 21356957a04Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 21456957a04Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 21556957a04Smrg`CONFIG_SITE' environment variable to the location of the site script. 21656957a04SmrgA warning: not all `configure' scripts look for a site script. 21756957a04Smrg 21856957a04SmrgDefining Variables 21956957a04Smrg================== 22056957a04Smrg 22156957a04Smrg Variables not defined in a site shell script can be set in the 22256957a04Smrgenvironment passed to `configure'. However, some packages may run 22356957a04Smrgconfigure again during the build, and the customized values of these 22456957a04Smrgvariables may be lost. In order to avoid this problem, you should set 22556957a04Smrgthem in the `configure' command line, using `VAR=value'. For example: 22656957a04Smrg 22756957a04Smrg ./configure CC=/usr/local2/bin/gcc 22856957a04Smrg 22956957a04Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 23056957a04Smrgoverridden in the site shell script). 23156957a04Smrg 23256957a04SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 23356957a04Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 23456957a04Smrg 23556957a04Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 23656957a04Smrg 23756957a04Smrg`configure' Invocation 23856957a04Smrg====================== 23956957a04Smrg 24056957a04Smrg `configure' recognizes the following options to control how it 24156957a04Smrgoperates. 24256957a04Smrg 24356957a04Smrg`--help' 24456957a04Smrg`-h' 24556957a04Smrg Print a summary of all of the options to `configure', and exit. 24656957a04Smrg 24756957a04Smrg`--help=short' 24856957a04Smrg`--help=recursive' 24956957a04Smrg Print a summary of the options unique to this package's 25056957a04Smrg `configure', and exit. The `short' variant lists options used 25156957a04Smrg only in the top level, while the `recursive' variant lists options 25256957a04Smrg also present in any nested packages. 25356957a04Smrg 25456957a04Smrg`--version' 25556957a04Smrg`-V' 25656957a04Smrg Print the version of Autoconf used to generate the `configure' 25756957a04Smrg script, and exit. 25856957a04Smrg 25956957a04Smrg`--cache-file=FILE' 26056957a04Smrg Enable the cache: use and save the results of the tests in FILE, 26156957a04Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 26256957a04Smrg disable caching. 26356957a04Smrg 26456957a04Smrg`--config-cache' 26556957a04Smrg`-C' 26656957a04Smrg Alias for `--cache-file=config.cache'. 26756957a04Smrg 26856957a04Smrg`--quiet' 26956957a04Smrg`--silent' 27056957a04Smrg`-q' 27156957a04Smrg Do not print messages saying which checks are being made. To 27256957a04Smrg suppress all normal output, redirect it to `/dev/null' (any error 27356957a04Smrg messages will still be shown). 27456957a04Smrg 27556957a04Smrg`--srcdir=DIR' 27656957a04Smrg Look for the package's source code in directory DIR. Usually 27756957a04Smrg `configure' can determine that directory automatically. 27856957a04Smrg 27956957a04Smrg`--prefix=DIR' 28056957a04Smrg Use DIR as the installation prefix. *Note Installation Names:: 28156957a04Smrg for more details, including other options available for fine-tuning 28256957a04Smrg the installation locations. 28356957a04Smrg 28456957a04Smrg`--no-create' 28556957a04Smrg`-n' 28656957a04Smrg Run the configure checks, but stop before creating any output 28756957a04Smrg files. 28856957a04Smrg 28956957a04Smrg`configure' also accepts some other, not widely useful, options. Run 29056957a04Smrg`configure --help' for more details. 29156957a04Smrg 292