18512f934SmrgInstallation Instructions 28512f934Smrg************************* 38512f934Smrg 419d64aeeSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 519d64aeeSmrgInc. 68512f934Smrg 719d64aeeSmrg Copying and distribution of this file, with or without modification, 819d64aeeSmrgare permitted in any medium without royalty provided the copyright 919d64aeeSmrgnotice and this notice are preserved. This file is offered as-is, 1019d64aeeSmrgwithout warranty of any kind. 118512f934Smrg 128512f934SmrgBasic Installation 138512f934Smrg================== 148512f934Smrg 158512f934Smrg Briefly, the shell commands `./configure; make; make install' should 168512f934Smrgconfigure, build, and install this package. The following 178512f934Smrgmore-detailed instructions are generic; see the `README' file for 1819d64aeeSmrginstructions specific to this package. Some packages provide this 1919d64aeeSmrg`INSTALL' file but do not implement all of the features documented 2019d64aeeSmrgbelow. The lack of an optional feature in a given package is not 2119d64aeeSmrgnecessarily a bug. More recommendations for GNU packages can be found 2219d64aeeSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 238512f934Smrg 248512f934Smrg The `configure' shell script attempts to guess correct values for 258512f934Smrgvarious system-dependent variables used during compilation. It uses 268512f934Smrgthose values to create a `Makefile' in each directory of the package. 278512f934SmrgIt may also create one or more `.h' files containing system-dependent 288512f934Smrgdefinitions. Finally, it creates a shell script `config.status' that 298512f934Smrgyou can run in the future to recreate the current configuration, and a 308512f934Smrgfile `config.log' containing compiler output (useful mainly for 318512f934Smrgdebugging `configure'). 328512f934Smrg 338512f934Smrg It can also use an optional file (typically called `config.cache' 348512f934Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 358512f934Smrgthe results of its tests to speed up reconfiguring. Caching is 368512f934Smrgdisabled by default to prevent problems with accidental use of stale 378512f934Smrgcache files. 388512f934Smrg 398512f934Smrg If you need to do unusual things to compile the package, please try 408512f934Smrgto figure out how `configure' could check whether to do them, and mail 418512f934Smrgdiffs or instructions to the address given in the `README' so they can 428512f934Smrgbe considered for the next release. If you are using the cache, and at 438512f934Smrgsome point `config.cache' contains results you don't want to keep, you 448512f934Smrgmay remove or edit it. 458512f934Smrg 468512f934Smrg The file `configure.ac' (or `configure.in') is used to create 478512f934Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 488512f934Smrgyou want to change it or regenerate `configure' using a newer version 498512f934Smrgof `autoconf'. 508512f934Smrg 5119d64aeeSmrg The simplest way to compile this package is: 528512f934Smrg 538512f934Smrg 1. `cd' to the directory containing the package's source code and type 548512f934Smrg `./configure' to configure the package for your system. 558512f934Smrg 568512f934Smrg Running `configure' might take a while. While running, it prints 578512f934Smrg some messages telling which features it is checking for. 588512f934Smrg 598512f934Smrg 2. Type `make' to compile the package. 608512f934Smrg 618512f934Smrg 3. Optionally, type `make check' to run any self-tests that come with 6219d64aeeSmrg the package, generally using the just-built uninstalled binaries. 638512f934Smrg 648512f934Smrg 4. Type `make install' to install the programs and any data files and 6519d64aeeSmrg documentation. When installing into a prefix owned by root, it is 6619d64aeeSmrg recommended that the package be configured and built as a regular 6719d64aeeSmrg user, and only the `make install' phase executed with root 6819d64aeeSmrg privileges. 6919d64aeeSmrg 7019d64aeeSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7119d64aeeSmrg this time using the binaries in their final installed location. 7219d64aeeSmrg This target does not install anything. Running this target as a 7319d64aeeSmrg regular user, particularly if the prior `make install' required 7419d64aeeSmrg root privileges, verifies that the installation completed 7519d64aeeSmrg correctly. 7619d64aeeSmrg 7719d64aeeSmrg 6. You can remove the program binaries and object files from the 788512f934Smrg source code directory by typing `make clean'. To also remove the 798512f934Smrg files that `configure' created (so you can compile the package for 808512f934Smrg a different kind of computer), type `make distclean'. There is 818512f934Smrg also a `make maintainer-clean' target, but that is intended mainly 828512f934Smrg for the package's developers. If you use it, you may have to get 838512f934Smrg all sorts of other programs in order to regenerate files that came 848512f934Smrg with the distribution. 858512f934Smrg 8619d64aeeSmrg 7. Often, you can also type `make uninstall' to remove the installed 8719d64aeeSmrg files again. In practice, not all packages have tested that 8819d64aeeSmrg uninstallation works correctly, even though it is required by the 8919d64aeeSmrg GNU Coding Standards. 9019d64aeeSmrg 9119d64aeeSmrg 8. Some packages, particularly those that use Automake, provide `make 9219d64aeeSmrg distcheck', which can by used by developers to test that all other 9319d64aeeSmrg targets like `make install' and `make uninstall' work correctly. 9419d64aeeSmrg This target is generally not run by end users. 958512f934Smrg 968512f934SmrgCompilers and Options 978512f934Smrg===================== 988512f934Smrg 998512f934Smrg Some systems require unusual options for compilation or linking that 1008512f934Smrgthe `configure' script does not know about. Run `./configure --help' 1018512f934Smrgfor details on some of the pertinent environment variables. 1028512f934Smrg 1038512f934Smrg You can give `configure' initial values for configuration parameters 1048512f934Smrgby setting variables in the command line or in the environment. Here 1058512f934Smrgis an example: 1068512f934Smrg 1078512f934Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1088512f934Smrg 1098512f934Smrg *Note Defining Variables::, for more details. 1108512f934Smrg 1118512f934SmrgCompiling For Multiple Architectures 1128512f934Smrg==================================== 1138512f934Smrg 1148512f934Smrg You can compile the package for more than one kind of computer at the 1158512f934Smrgsame time, by placing the object files for each architecture in their 1168512f934Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1178512f934Smrgdirectory where you want the object files and executables to go and run 1188512f934Smrgthe `configure' script. `configure' automatically checks for the 11919d64aeeSmrgsource code in the directory that `configure' is in and in `..'. This 12019d64aeeSmrgis known as a "VPATH" build. 1218512f934Smrg 1228512f934Smrg With a non-GNU `make', it is safer to compile the package for one 1238512f934Smrgarchitecture at a time in the source code directory. After you have 1248512f934Smrginstalled the package for one architecture, use `make distclean' before 1258512f934Smrgreconfiguring for another architecture. 1268512f934Smrg 1278512f934Smrg On MacOS X 10.5 and later systems, you can create libraries and 1288512f934Smrgexecutables that work on multiple system types--known as "fat" or 1298512f934Smrg"universal" binaries--by specifying multiple `-arch' options to the 1308512f934Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1318512f934Smrgthis: 1328512f934Smrg 1338512f934Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1348512f934Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1358512f934Smrg CPP="gcc -E" CXXCPP="g++ -E" 1368512f934Smrg 1378512f934Smrg This is not guaranteed to produce working output in all cases, you 1388512f934Smrgmay have to build one architecture at a time and combine the results 1398512f934Smrgusing the `lipo' tool if you have problems. 1408512f934Smrg 1418512f934SmrgInstallation Names 1428512f934Smrg================== 1438512f934Smrg 1448512f934Smrg By default, `make install' installs the package's commands under 1458512f934Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1468512f934Smrgcan specify an installation prefix other than `/usr/local' by giving 14719d64aeeSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14819d64aeeSmrgabsolute file name. 1498512f934Smrg 1508512f934Smrg You can specify separate installation prefixes for 1518512f934Smrgarchitecture-specific files and architecture-independent files. If you 1528512f934Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1538512f934SmrgPREFIX as the prefix for installing programs and libraries. 1548512f934SmrgDocumentation and other data files still use the regular prefix. 1558512f934Smrg 1568512f934Smrg In addition, if you use an unusual directory layout you can give 1578512f934Smrgoptions like `--bindir=DIR' to specify different values for particular 1588512f934Smrgkinds of files. Run `configure --help' for a list of the directories 15919d64aeeSmrgyou can set and what kinds of files go in them. In general, the 16019d64aeeSmrgdefault for these options is expressed in terms of `${prefix}', so that 16119d64aeeSmrgspecifying just `--prefix' will affect all of the other directory 16219d64aeeSmrgspecifications that were not explicitly provided. 16319d64aeeSmrg 16419d64aeeSmrg The most portable way to affect installation locations is to pass the 16519d64aeeSmrgcorrect locations to `configure'; however, many packages provide one or 16619d64aeeSmrgboth of the following shortcuts of passing variable assignments to the 16719d64aeeSmrg`make install' command line to change installation locations without 16819d64aeeSmrghaving to reconfigure or recompile. 16919d64aeeSmrg 17019d64aeeSmrg The first method involves providing an override variable for each 17119d64aeeSmrgaffected directory. For example, `make install 17219d64aeeSmrgprefix=/alternate/directory' will choose an alternate location for all 17319d64aeeSmrgdirectory configuration variables that were expressed in terms of 17419d64aeeSmrg`${prefix}'. Any directories that were specified during `configure', 17519d64aeeSmrgbut not in terms of `${prefix}', must each be overridden at install 17619d64aeeSmrgtime for the entire installation to be relocated. The approach of 17719d64aeeSmrgmakefile variable overrides for each directory variable is required by 17819d64aeeSmrgthe GNU Coding Standards, and ideally causes no recompilation. 17919d64aeeSmrgHowever, some platforms have known limitations with the semantics of 18019d64aeeSmrgshared libraries that end up requiring recompilation when using this 18119d64aeeSmrgmethod, particularly noticeable in packages that use GNU Libtool. 18219d64aeeSmrg 18319d64aeeSmrg The second method involves providing the `DESTDIR' variable. For 18419d64aeeSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 18519d64aeeSmrg`/alternate/directory' before all installation names. The approach of 18619d64aeeSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18719d64aeeSmrgdoes not work on platforms that have drive letters. On the other hand, 18819d64aeeSmrgit does better at avoiding recompilation issues, and works well even 18919d64aeeSmrgwhen some directory options were not specified in terms of `${prefix}' 19019d64aeeSmrgat `configure' time. 19119d64aeeSmrg 19219d64aeeSmrgOptional Features 19319d64aeeSmrg================= 1948512f934Smrg 1958512f934Smrg If the package supports it, you can cause programs to be installed 1968512f934Smrgwith an extra prefix or suffix on their names by giving `configure' the 1978512f934Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1988512f934Smrg 1998512f934Smrg Some packages pay attention to `--enable-FEATURE' options to 2008512f934Smrg`configure', where FEATURE indicates an optional part of the package. 2018512f934SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2028512f934Smrgis something like `gnu-as' or `x' (for the X Window System). The 2038512f934Smrg`README' should mention any `--enable-' and `--with-' options that the 2048512f934Smrgpackage recognizes. 2058512f934Smrg 2068512f934Smrg For packages that use the X Window System, `configure' can usually 2078512f934Smrgfind the X include and library files automatically, but if it doesn't, 2088512f934Smrgyou can use the `configure' options `--x-includes=DIR' and 2098512f934Smrg`--x-libraries=DIR' to specify their locations. 2108512f934Smrg 21119d64aeeSmrg Some packages offer the ability to configure how verbose the 21219d64aeeSmrgexecution of `make' will be. For these packages, running `./configure 21319d64aeeSmrg--enable-silent-rules' sets the default to minimal output, which can be 21419d64aeeSmrgoverridden with `make V=1'; while running `./configure 21519d64aeeSmrg--disable-silent-rules' sets the default to verbose, which can be 21619d64aeeSmrgoverridden with `make V=0'. 21719d64aeeSmrg 2188512f934SmrgParticular systems 2198512f934Smrg================== 2208512f934Smrg 2218512f934Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2228512f934SmrgCC is not installed, it is recommended to use the following options in 2238512f934Smrgorder to use an ANSI C compiler: 2248512f934Smrg 22519d64aeeSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2268512f934Smrg 2278512f934Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2288512f934Smrg 22919d64aeeSmrg HP-UX `make' updates targets which have the same time stamps as 23019d64aeeSmrgtheir prerequisites, which makes it generally unusable when shipped 23119d64aeeSmrggenerated files such as `configure' are involved. Use GNU `make' 23219d64aeeSmrginstead. 23319d64aeeSmrg 2348512f934Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2358512f934Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2368512f934Smrga workaround. If GNU CC is not installed, it is therefore recommended 2378512f934Smrgto try 2388512f934Smrg 2398512f934Smrg ./configure CC="cc" 2408512f934Smrg 2418512f934Smrgand if that doesn't work, try 2428512f934Smrg 2438512f934Smrg ./configure CC="cc -nodtk" 2448512f934Smrg 24519d64aeeSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24619d64aeeSmrgdirectory contains several dysfunctional programs; working variants of 24719d64aeeSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24819d64aeeSmrgin your `PATH', put it _after_ `/usr/bin'. 24919d64aeeSmrg 25019d64aeeSmrg On Haiku, software installed for all users goes in `/boot/common', 25119d64aeeSmrgnot `/usr/local'. It is recommended to use the following options: 25219d64aeeSmrg 25319d64aeeSmrg ./configure --prefix=/boot/common 25419d64aeeSmrg 2558512f934SmrgSpecifying the System Type 2568512f934Smrg========================== 2578512f934Smrg 2588512f934Smrg There may be some features `configure' cannot figure out 2598512f934Smrgautomatically, but needs to determine by the type of machine the package 2608512f934Smrgwill run on. Usually, assuming the package is built to be run on the 2618512f934Smrg_same_ architectures, `configure' can figure that out, but if it prints 2628512f934Smrga message saying it cannot guess the machine type, give it the 2638512f934Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2648512f934Smrgtype, such as `sun4', or a canonical name which has the form: 2658512f934Smrg 2668512f934Smrg CPU-COMPANY-SYSTEM 2678512f934Smrg 2688512f934Smrgwhere SYSTEM can have one of these forms: 2698512f934Smrg 27019d64aeeSmrg OS 27119d64aeeSmrg KERNEL-OS 2728512f934Smrg 2738512f934Smrg See the file `config.sub' for the possible values of each field. If 2748512f934Smrg`config.sub' isn't included in this package, then this package doesn't 2758512f934Smrgneed to know the machine type. 2768512f934Smrg 2778512f934Smrg If you are _building_ compiler tools for cross-compiling, you should 2788512f934Smrguse the option `--target=TYPE' to select the type of system they will 2798512f934Smrgproduce code for. 2808512f934Smrg 2818512f934Smrg If you want to _use_ a cross compiler, that generates code for a 2828512f934Smrgplatform different from the build platform, you should specify the 2838512f934Smrg"host" platform (i.e., that on which the generated programs will 2848512f934Smrgeventually be run) with `--host=TYPE'. 2858512f934Smrg 2868512f934SmrgSharing Defaults 2878512f934Smrg================ 2888512f934Smrg 2898512f934Smrg If you want to set default values for `configure' scripts to share, 2908512f934Smrgyou can create a site shell script called `config.site' that gives 2918512f934Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2928512f934Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2938512f934Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2948512f934Smrg`CONFIG_SITE' environment variable to the location of the site script. 2958512f934SmrgA warning: not all `configure' scripts look for a site script. 2968512f934Smrg 2978512f934SmrgDefining Variables 2988512f934Smrg================== 2998512f934Smrg 3008512f934Smrg Variables not defined in a site shell script can be set in the 3018512f934Smrgenvironment passed to `configure'. However, some packages may run 3028512f934Smrgconfigure again during the build, and the customized values of these 3038512f934Smrgvariables may be lost. In order to avoid this problem, you should set 3048512f934Smrgthem in the `configure' command line, using `VAR=value'. For example: 3058512f934Smrg 3068512f934Smrg ./configure CC=/usr/local2/bin/gcc 3078512f934Smrg 3088512f934Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3098512f934Smrgoverridden in the site shell script). 3108512f934Smrg 3118512f934SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3128512f934Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3138512f934Smrg 3148512f934Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3158512f934Smrg 3168512f934Smrg`configure' Invocation 3178512f934Smrg====================== 3188512f934Smrg 3198512f934Smrg `configure' recognizes the following options to control how it 3208512f934Smrgoperates. 3218512f934Smrg 3228512f934Smrg`--help' 3238512f934Smrg`-h' 3248512f934Smrg Print a summary of all of the options to `configure', and exit. 3258512f934Smrg 3268512f934Smrg`--help=short' 3278512f934Smrg`--help=recursive' 3288512f934Smrg Print a summary of the options unique to this package's 3298512f934Smrg `configure', and exit. The `short' variant lists options used 3308512f934Smrg only in the top level, while the `recursive' variant lists options 3318512f934Smrg also present in any nested packages. 3328512f934Smrg 3338512f934Smrg`--version' 3348512f934Smrg`-V' 3358512f934Smrg Print the version of Autoconf used to generate the `configure' 3368512f934Smrg script, and exit. 3378512f934Smrg 3388512f934Smrg`--cache-file=FILE' 3398512f934Smrg Enable the cache: use and save the results of the tests in FILE, 3408512f934Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3418512f934Smrg disable caching. 3428512f934Smrg 3438512f934Smrg`--config-cache' 3448512f934Smrg`-C' 3458512f934Smrg Alias for `--cache-file=config.cache'. 3468512f934Smrg 3478512f934Smrg`--quiet' 3488512f934Smrg`--silent' 3498512f934Smrg`-q' 3508512f934Smrg Do not print messages saying which checks are being made. To 3518512f934Smrg suppress all normal output, redirect it to `/dev/null' (any error 3528512f934Smrg messages will still be shown). 3538512f934Smrg 3548512f934Smrg`--srcdir=DIR' 3558512f934Smrg Look for the package's source code in directory DIR. Usually 3568512f934Smrg `configure' can determine that directory automatically. 3578512f934Smrg 3588512f934Smrg`--prefix=DIR' 35919d64aeeSmrg Use DIR as the installation prefix. *note Installation Names:: 3608512f934Smrg for more details, including other options available for fine-tuning 3618512f934Smrg the installation locations. 3628512f934Smrg 3638512f934Smrg`--no-create' 3648512f934Smrg`-n' 3658512f934Smrg Run the configure checks, but stop before creating any output 3668512f934Smrg files. 3678512f934Smrg 3688512f934Smrg`configure' also accepts some other, not widely useful, options. Run 3698512f934Smrg`configure --help' for more details. 3708512f934Smrg 371