11b108b8bSchristosInstallation Instructions 21b108b8bSchristos************************* 31b108b8bSchristos 41b108b8bSchristosCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 53c2a2008Schristos2006, 2007, 2008, 2009 Free Software Foundation, Inc. 61b108b8bSchristos 7*afa9587fSchristos This file is free documentation; the Free Software Foundation gives 8*afa9587fSchristosunlimited permission to copy, distribute and modify it. 91b108b8bSchristos 101b108b8bSchristosBasic Installation 111b108b8bSchristos================== 121b108b8bSchristos 131b108b8bSchristos Briefly, the shell commands `./configure; make; make install' should 141b108b8bSchristosconfigure, build, and install this package. The following 151b108b8bSchristosmore-detailed instructions are generic; see the `README' file for 16*afa9587fSchristosinstructions specific to this package. 171b108b8bSchristos 181b108b8bSchristos The `configure' shell script attempts to guess correct values for 191b108b8bSchristosvarious system-dependent variables used during compilation. It uses 201b108b8bSchristosthose values to create a `Makefile' in each directory of the package. 211b108b8bSchristosIt may also create one or more `.h' files containing system-dependent 221b108b8bSchristosdefinitions. Finally, it creates a shell script `config.status' that 231b108b8bSchristosyou can run in the future to recreate the current configuration, and a 241b108b8bSchristosfile `config.log' containing compiler output (useful mainly for 251b108b8bSchristosdebugging `configure'). 261b108b8bSchristos 271b108b8bSchristos It can also use an optional file (typically called `config.cache' 281b108b8bSchristosand enabled with `--cache-file=config.cache' or simply `-C') that saves 291b108b8bSchristosthe results of its tests to speed up reconfiguring. Caching is 301b108b8bSchristosdisabled by default to prevent problems with accidental use of stale 311b108b8bSchristoscache files. 321b108b8bSchristos 331b108b8bSchristos If you need to do unusual things to compile the package, please try 341b108b8bSchristosto figure out how `configure' could check whether to do them, and mail 351b108b8bSchristosdiffs or instructions to the address given in the `README' so they can 361b108b8bSchristosbe considered for the next release. If you are using the cache, and at 371b108b8bSchristossome point `config.cache' contains results you don't want to keep, you 381b108b8bSchristosmay remove or edit it. 391b108b8bSchristos 401b108b8bSchristos The file `configure.ac' (or `configure.in') is used to create 411b108b8bSchristos`configure' by a program called `autoconf'. You need `configure.ac' if 421b108b8bSchristosyou want to change it or regenerate `configure' using a newer version 431b108b8bSchristosof `autoconf'. 441b108b8bSchristos 451b108b8bSchristosThe simplest way to compile this package is: 461b108b8bSchristos 471b108b8bSchristos 1. `cd' to the directory containing the package's source code and type 481b108b8bSchristos `./configure' to configure the package for your system. 491b108b8bSchristos 501b108b8bSchristos Running `configure' might take a while. While running, it prints 511b108b8bSchristos some messages telling which features it is checking for. 521b108b8bSchristos 531b108b8bSchristos 2. Type `make' to compile the package. 541b108b8bSchristos 551b108b8bSchristos 3. Optionally, type `make check' to run any self-tests that come with 56*afa9587fSchristos the package. 571b108b8bSchristos 581b108b8bSchristos 4. Type `make install' to install the programs and any data files and 59*afa9587fSchristos documentation. 601b108b8bSchristos 61*afa9587fSchristos 5. You can remove the program binaries and object files from the 621b108b8bSchristos source code directory by typing `make clean'. To also remove the 631b108b8bSchristos files that `configure' created (so you can compile the package for 641b108b8bSchristos a different kind of computer), type `make distclean'. There is 651b108b8bSchristos also a `make maintainer-clean' target, but that is intended mainly 661b108b8bSchristos for the package's developers. If you use it, you may have to get 671b108b8bSchristos all sorts of other programs in order to regenerate files that came 681b108b8bSchristos with the distribution. 691b108b8bSchristos 70*afa9587fSchristos 6. Often, you can also type `make uninstall' to remove the installed 71*afa9587fSchristos files again. 723c2a2008Schristos 731b108b8bSchristosCompilers and Options 741b108b8bSchristos===================== 751b108b8bSchristos 763c2a2008Schristos Some systems require unusual options for compilation or linking that 773c2a2008Schristosthe `configure' script does not know about. Run `./configure --help' 783c2a2008Schristosfor details on some of the pertinent environment variables. 791b108b8bSchristos 801b108b8bSchristos You can give `configure' initial values for configuration parameters 811b108b8bSchristosby setting variables in the command line or in the environment. Here 821b108b8bSchristosis an example: 831b108b8bSchristos 841b108b8bSchristos ./configure CC=c99 CFLAGS=-g LIBS=-lposix 851b108b8bSchristos 861b108b8bSchristos *Note Defining Variables::, for more details. 871b108b8bSchristos 881b108b8bSchristosCompiling For Multiple Architectures 891b108b8bSchristos==================================== 901b108b8bSchristos 911b108b8bSchristos You can compile the package for more than one kind of computer at the 921b108b8bSchristossame time, by placing the object files for each architecture in their 931b108b8bSchristosown directory. To do this, you can use GNU `make'. `cd' to the 941b108b8bSchristosdirectory where you want the object files and executables to go and run 951b108b8bSchristosthe `configure' script. `configure' automatically checks for the 96*afa9587fSchristossource code in the directory that `configure' is in and in `..'. 971b108b8bSchristos 981b108b8bSchristos With a non-GNU `make', it is safer to compile the package for one 991b108b8bSchristosarchitecture at a time in the source code directory. After you have 1001b108b8bSchristosinstalled the package for one architecture, use `make distclean' before 1011b108b8bSchristosreconfiguring for another architecture. 1021b108b8bSchristos 1033c2a2008Schristos On MacOS X 10.5 and later systems, you can create libraries and 1043c2a2008Schristosexecutables that work on multiple system types--known as "fat" or 1053c2a2008Schristos"universal" binaries--by specifying multiple `-arch' options to the 1063c2a2008Schristoscompiler but only a single `-arch' option to the preprocessor. Like 1073c2a2008Schristosthis: 1083c2a2008Schristos 1093c2a2008Schristos ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1103c2a2008Schristos CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1113c2a2008Schristos CPP="gcc -E" CXXCPP="g++ -E" 1123c2a2008Schristos 1133c2a2008Schristos This is not guaranteed to produce working output in all cases, you 1143c2a2008Schristosmay have to build one architecture at a time and combine the results 1153c2a2008Schristosusing the `lipo' tool if you have problems. 1163c2a2008Schristos 1171b108b8bSchristosInstallation Names 1181b108b8bSchristos================== 1191b108b8bSchristos 1201b108b8bSchristos By default, `make install' installs the package's commands under 1211b108b8bSchristos`/usr/local/bin', include files under `/usr/local/include', etc. You 1221b108b8bSchristoscan specify an installation prefix other than `/usr/local' by giving 123*afa9587fSchristos`configure' the option `--prefix=PREFIX'. 1241b108b8bSchristos 1251b108b8bSchristos You can specify separate installation prefixes for 1261b108b8bSchristosarchitecture-specific files and architecture-independent files. If you 1271b108b8bSchristospass the option `--exec-prefix=PREFIX' to `configure', the package uses 1281b108b8bSchristosPREFIX as the prefix for installing programs and libraries. 1291b108b8bSchristosDocumentation and other data files still use the regular prefix. 1301b108b8bSchristos 1311b108b8bSchristos In addition, if you use an unusual directory layout you can give 1321b108b8bSchristosoptions like `--bindir=DIR' to specify different values for particular 1331b108b8bSchristoskinds of files. Run `configure --help' for a list of the directories 134*afa9587fSchristosyou can set and what kinds of files go in them. 1351b108b8bSchristos 1361b108b8bSchristos If the package supports it, you can cause programs to be installed 1371b108b8bSchristoswith an extra prefix or suffix on their names by giving `configure' the 1381b108b8bSchristosoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1391b108b8bSchristos 140*afa9587fSchristosOptional Features 141*afa9587fSchristos================= 142*afa9587fSchristos 1431b108b8bSchristos Some packages pay attention to `--enable-FEATURE' options to 1441b108b8bSchristos`configure', where FEATURE indicates an optional part of the package. 1451b108b8bSchristosThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 1461b108b8bSchristosis something like `gnu-as' or `x' (for the X Window System). The 1471b108b8bSchristos`README' should mention any `--enable-' and `--with-' options that the 1481b108b8bSchristospackage recognizes. 1491b108b8bSchristos 1501b108b8bSchristos For packages that use the X Window System, `configure' can usually 1511b108b8bSchristosfind the X include and library files automatically, but if it doesn't, 1521b108b8bSchristosyou can use the `configure' options `--x-includes=DIR' and 1531b108b8bSchristos`--x-libraries=DIR' to specify their locations. 1541b108b8bSchristos 1553c2a2008SchristosParticular systems 1563c2a2008Schristos================== 1573c2a2008Schristos 1583c2a2008Schristos On HP-UX, the default C compiler is not ANSI C compatible. If GNU 1593c2a2008SchristosCC is not installed, it is recommended to use the following options in 1603c2a2008Schristosorder to use an ANSI C compiler: 1613c2a2008Schristos 1623c2a2008Schristos ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 1633c2a2008Schristos 1643c2a2008Schristosand if that doesn't work, install pre-built binaries of GCC for HP-UX. 1653c2a2008Schristos 1663c2a2008Schristos On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 1673c2a2008Schristosparse its `<wchar.h>' header file. The option `-nodtk' can be used as 1683c2a2008Schristosa workaround. If GNU CC is not installed, it is therefore recommended 1693c2a2008Schristosto try 1703c2a2008Schristos 1713c2a2008Schristos ./configure CC="cc" 1723c2a2008Schristos 1733c2a2008Schristosand if that doesn't work, try 1743c2a2008Schristos 1753c2a2008Schristos ./configure CC="cc -nodtk" 1763c2a2008Schristos 1773c2a2008Schristos On Solaris, don't put `/usr/ucb' early in your `PATH'. This 1783c2a2008Schristosdirectory contains several dysfunctional programs; working variants of 1793c2a2008Schristosthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 1803c2a2008Schristosin your `PATH', put it _after_ `/usr/bin'. 1813c2a2008Schristos 1823c2a2008Schristos On Haiku, software installed for all users goes in `/boot/common', 1833c2a2008Schristosnot `/usr/local'. It is recommended to use the following options: 1843c2a2008Schristos 1853c2a2008Schristos ./configure --prefix=/boot/common 1863c2a2008Schristos 1871b108b8bSchristosSpecifying the System Type 1881b108b8bSchristos========================== 1891b108b8bSchristos 1903c2a2008Schristos There may be some features `configure' cannot figure out 1913c2a2008Schristosautomatically, but needs to determine by the type of machine the package 1923c2a2008Schristoswill run on. Usually, assuming the package is built to be run on the 1933c2a2008Schristos_same_ architectures, `configure' can figure that out, but if it prints 1943c2a2008Schristosa message saying it cannot guess the machine type, give it the 1951b108b8bSchristos`--build=TYPE' option. TYPE can either be a short name for the system 1961b108b8bSchristostype, such as `sun4', or a canonical name which has the form: 1971b108b8bSchristos 1981b108b8bSchristos CPU-COMPANY-SYSTEM 1991b108b8bSchristos 2001b108b8bSchristoswhere SYSTEM can have one of these forms: 2011b108b8bSchristos 2023c2a2008Schristos OS 2033c2a2008Schristos KERNEL-OS 2041b108b8bSchristos 2051b108b8bSchristos See the file `config.sub' for the possible values of each field. If 2061b108b8bSchristos`config.sub' isn't included in this package, then this package doesn't 2071b108b8bSchristosneed to know the machine type. 2081b108b8bSchristos 2091b108b8bSchristos If you are _building_ compiler tools for cross-compiling, you should 2101b108b8bSchristosuse the option `--target=TYPE' to select the type of system they will 2111b108b8bSchristosproduce code for. 2121b108b8bSchristos 2131b108b8bSchristos If you want to _use_ a cross compiler, that generates code for a 2141b108b8bSchristosplatform different from the build platform, you should specify the 2151b108b8bSchristos"host" platform (i.e., that on which the generated programs will 2161b108b8bSchristoseventually be run) with `--host=TYPE'. 2171b108b8bSchristos 2181b108b8bSchristosSharing Defaults 2191b108b8bSchristos================ 2201b108b8bSchristos 2213c2a2008Schristos If you want to set default values for `configure' scripts to share, 2223c2a2008Schristosyou can create a site shell script called `config.site' that gives 2233c2a2008Schristosdefault values for variables like `CC', `cache_file', and `prefix'. 2241b108b8bSchristos`configure' looks for `PREFIX/share/config.site' if it exists, then 2251b108b8bSchristos`PREFIX/etc/config.site' if it exists. Or, you can set the 2261b108b8bSchristos`CONFIG_SITE' environment variable to the location of the site script. 2271b108b8bSchristosA warning: not all `configure' scripts look for a site script. 2281b108b8bSchristos 2291b108b8bSchristosDefining Variables 2301b108b8bSchristos================== 2311b108b8bSchristos 2321b108b8bSchristos Variables not defined in a site shell script can be set in the 2331b108b8bSchristosenvironment passed to `configure'. However, some packages may run 2341b108b8bSchristosconfigure again during the build, and the customized values of these 2351b108b8bSchristosvariables may be lost. In order to avoid this problem, you should set 2361b108b8bSchristosthem in the `configure' command line, using `VAR=value'. For example: 2371b108b8bSchristos 2381b108b8bSchristos ./configure CC=/usr/local2/bin/gcc 2391b108b8bSchristos 2401b108b8bSchristoscauses the specified `gcc' to be used as the C compiler (unless it is 2411b108b8bSchristosoverridden in the site shell script). 2421b108b8bSchristos 2431b108b8bSchristosUnfortunately, this technique does not work for `CONFIG_SHELL' due to 2441b108b8bSchristosan Autoconf bug. Until the bug is fixed you can use this workaround: 2451b108b8bSchristos 2461b108b8bSchristos CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 2471b108b8bSchristos 2481b108b8bSchristos`configure' Invocation 2491b108b8bSchristos====================== 2501b108b8bSchristos 2513c2a2008Schristos `configure' recognizes the following options to control how it 2523c2a2008Schristosoperates. 2531b108b8bSchristos 2541b108b8bSchristos`--help' 2551b108b8bSchristos`-h' 2563c2a2008Schristos Print a summary of all of the options to `configure', and exit. 2573c2a2008Schristos 2583c2a2008Schristos`--help=short' 2593c2a2008Schristos`--help=recursive' 2603c2a2008Schristos Print a summary of the options unique to this package's 2613c2a2008Schristos `configure', and exit. The `short' variant lists options used 2623c2a2008Schristos only in the top level, while the `recursive' variant lists options 2633c2a2008Schristos also present in any nested packages. 2641b108b8bSchristos 2651b108b8bSchristos`--version' 2661b108b8bSchristos`-V' 2671b108b8bSchristos Print the version of Autoconf used to generate the `configure' 2681b108b8bSchristos script, and exit. 2691b108b8bSchristos 2701b108b8bSchristos`--cache-file=FILE' 2711b108b8bSchristos Enable the cache: use and save the results of the tests in FILE, 2721b108b8bSchristos traditionally `config.cache'. FILE defaults to `/dev/null' to 2731b108b8bSchristos disable caching. 2741b108b8bSchristos 2751b108b8bSchristos`--config-cache' 2761b108b8bSchristos`-C' 2771b108b8bSchristos Alias for `--cache-file=config.cache'. 2781b108b8bSchristos 2791b108b8bSchristos`--quiet' 2801b108b8bSchristos`--silent' 2811b108b8bSchristos`-q' 2821b108b8bSchristos Do not print messages saying which checks are being made. To 2831b108b8bSchristos suppress all normal output, redirect it to `/dev/null' (any error 2841b108b8bSchristos messages will still be shown). 2851b108b8bSchristos 2861b108b8bSchristos`--srcdir=DIR' 2871b108b8bSchristos Look for the package's source code in directory DIR. Usually 2881b108b8bSchristos `configure' can determine that directory automatically. 2891b108b8bSchristos 2903c2a2008Schristos`--prefix=DIR' 291*afa9587fSchristos Use DIR as the installation prefix. *Note Installation Names:: 2923c2a2008Schristos for more details, including other options available for fine-tuning 2933c2a2008Schristos the installation locations. 2943c2a2008Schristos 2953c2a2008Schristos`--no-create' 2963c2a2008Schristos`-n' 2973c2a2008Schristos Run the configure checks, but stop before creating any output 2983c2a2008Schristos files. 2993c2a2008Schristos 3001b108b8bSchristos`configure' also accepts some other, not widely useful, options. Run 3011b108b8bSchristos`configure --help' for more details. 3021b108b8bSchristos 303