1*5ddc57e5SXin LiInstallation Instructions 2*5ddc57e5SXin Li************************* 3*5ddc57e5SXin Li 4*5ddc57e5SXin LiCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5*5ddc57e5SXin Li2006, 2007, 2008, 2009 Free Software Foundation, Inc. 6*5ddc57e5SXin Li 7*5ddc57e5SXin Li Copying and distribution of this file, with or without modification, 8*5ddc57e5SXin Liare permitted in any medium without royalty provided the copyright 9*5ddc57e5SXin Linotice and this notice are preserved. This file is offered as-is, 10*5ddc57e5SXin Liwithout warranty of any kind. 11*5ddc57e5SXin Li 12*5ddc57e5SXin LiBasic Installation 13*5ddc57e5SXin Li================== 14*5ddc57e5SXin Li 15*5ddc57e5SXin Li Briefly, the shell commands `./configure; make; make install' should 16*5ddc57e5SXin Liconfigure, build, and install this package. The following 17*5ddc57e5SXin Limore-detailed instructions are generic; see the `README' file for 18*5ddc57e5SXin Liinstructions specific to this package. Some packages provide this 19*5ddc57e5SXin Li`INSTALL' file but do not implement all of the features documented 20*5ddc57e5SXin Libelow. The lack of an optional feature in a given package is not 21*5ddc57e5SXin Linecessarily a bug. More recommendations for GNU packages can be found 22*5ddc57e5SXin Liin *note Makefile Conventions: (standards)Makefile Conventions. 23*5ddc57e5SXin Li 24*5ddc57e5SXin Li The `configure' shell script attempts to guess correct values for 25*5ddc57e5SXin Livarious system-dependent variables used during compilation. It uses 26*5ddc57e5SXin Lithose values to create a `Makefile' in each directory of the package. 27*5ddc57e5SXin LiIt may also create one or more `.h' files containing system-dependent 28*5ddc57e5SXin Lidefinitions. Finally, it creates a shell script `config.status' that 29*5ddc57e5SXin Liyou can run in the future to recreate the current configuration, and a 30*5ddc57e5SXin Lifile `config.log' containing compiler output (useful mainly for 31*5ddc57e5SXin Lidebugging `configure'). 32*5ddc57e5SXin Li 33*5ddc57e5SXin Li It can also use an optional file (typically called `config.cache' 34*5ddc57e5SXin Liand enabled with `--cache-file=config.cache' or simply `-C') that saves 35*5ddc57e5SXin Lithe results of its tests to speed up reconfiguring. Caching is 36*5ddc57e5SXin Lidisabled by default to prevent problems with accidental use of stale 37*5ddc57e5SXin Licache files. 38*5ddc57e5SXin Li 39*5ddc57e5SXin Li If you need to do unusual things to compile the package, please try 40*5ddc57e5SXin Lito figure out how `configure' could check whether to do them, and mail 41*5ddc57e5SXin Lidiffs or instructions to the address given in the `README' so they can 42*5ddc57e5SXin Libe considered for the next release. If you are using the cache, and at 43*5ddc57e5SXin Lisome point `config.cache' contains results you don't want to keep, you 44*5ddc57e5SXin Limay remove or edit it. 45*5ddc57e5SXin Li 46*5ddc57e5SXin Li The file `configure.ac' (or `configure.in') is used to create 47*5ddc57e5SXin Li`configure' by a program called `autoconf'. You need `configure.ac' if 48*5ddc57e5SXin Liyou want to change it or regenerate `configure' using a newer version 49*5ddc57e5SXin Liof `autoconf'. 50*5ddc57e5SXin Li 51*5ddc57e5SXin Li The simplest way to compile this package is: 52*5ddc57e5SXin Li 53*5ddc57e5SXin Li 1. `cd' to the directory containing the package's source code and type 54*5ddc57e5SXin Li `./configure' to configure the package for your system. 55*5ddc57e5SXin Li 56*5ddc57e5SXin Li Running `configure' might take a while. While running, it prints 57*5ddc57e5SXin Li some messages telling which features it is checking for. 58*5ddc57e5SXin Li 59*5ddc57e5SXin Li 2. Type `make' to compile the package. 60*5ddc57e5SXin Li 61*5ddc57e5SXin Li 3. Optionally, type `make check' to run any self-tests that come with 62*5ddc57e5SXin Li the package, generally using the just-built uninstalled binaries. 63*5ddc57e5SXin Li 64*5ddc57e5SXin Li 4. Type `make install' to install the programs and any data files and 65*5ddc57e5SXin Li documentation. When installing into a prefix owned by root, it is 66*5ddc57e5SXin Li recommended that the package be configured and built as a regular 67*5ddc57e5SXin Li user, and only the `make install' phase executed with root 68*5ddc57e5SXin Li privileges. 69*5ddc57e5SXin Li 70*5ddc57e5SXin Li 5. Optionally, type `make installcheck' to repeat any self-tests, but 71*5ddc57e5SXin Li this time using the binaries in their final installed location. 72*5ddc57e5SXin Li This target does not install anything. Running this target as a 73*5ddc57e5SXin Li regular user, particularly if the prior `make install' required 74*5ddc57e5SXin Li root privileges, verifies that the installation completed 75*5ddc57e5SXin Li correctly. 76*5ddc57e5SXin Li 77*5ddc57e5SXin Li 6. You can remove the program binaries and object files from the 78*5ddc57e5SXin Li source code directory by typing `make clean'. To also remove the 79*5ddc57e5SXin Li files that `configure' created (so you can compile the package for 80*5ddc57e5SXin Li a different kind of computer), type `make distclean'. There is 81*5ddc57e5SXin Li also a `make maintainer-clean' target, but that is intended mainly 82*5ddc57e5SXin Li for the package's developers. If you use it, you may have to get 83*5ddc57e5SXin Li all sorts of other programs in order to regenerate files that came 84*5ddc57e5SXin Li with the distribution. 85*5ddc57e5SXin Li 86*5ddc57e5SXin Li 7. Often, you can also type `make uninstall' to remove the installed 87*5ddc57e5SXin Li files again. In practice, not all packages have tested that 88*5ddc57e5SXin Li uninstallation works correctly, even though it is required by the 89*5ddc57e5SXin Li GNU Coding Standards. 90*5ddc57e5SXin Li 91*5ddc57e5SXin Li 8. Some packages, particularly those that use Automake, provide `make 92*5ddc57e5SXin Li distcheck', which can by used by developers to test that all other 93*5ddc57e5SXin Li targets like `make install' and `make uninstall' work correctly. 94*5ddc57e5SXin Li This target is generally not run by end users. 95*5ddc57e5SXin Li 96*5ddc57e5SXin LiCompilers and Options 97*5ddc57e5SXin Li===================== 98*5ddc57e5SXin Li 99*5ddc57e5SXin Li Some systems require unusual options for compilation or linking that 100*5ddc57e5SXin Lithe `configure' script does not know about. Run `./configure --help' 101*5ddc57e5SXin Lifor details on some of the pertinent environment variables. 102*5ddc57e5SXin Li 103*5ddc57e5SXin Li You can give `configure' initial values for configuration parameters 104*5ddc57e5SXin Liby setting variables in the command line or in the environment. Here 105*5ddc57e5SXin Liis an example: 106*5ddc57e5SXin Li 107*5ddc57e5SXin Li ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108*5ddc57e5SXin Li 109*5ddc57e5SXin Li *Note Defining Variables::, for more details. 110*5ddc57e5SXin Li 111*5ddc57e5SXin LiCompiling For Multiple Architectures 112*5ddc57e5SXin Li==================================== 113*5ddc57e5SXin Li 114*5ddc57e5SXin Li You can compile the package for more than one kind of computer at the 115*5ddc57e5SXin Lisame time, by placing the object files for each architecture in their 116*5ddc57e5SXin Liown directory. To do this, you can use GNU `make'. `cd' to the 117*5ddc57e5SXin Lidirectory where you want the object files and executables to go and run 118*5ddc57e5SXin Lithe `configure' script. `configure' automatically checks for the 119*5ddc57e5SXin Lisource code in the directory that `configure' is in and in `..'. This 120*5ddc57e5SXin Liis known as a "VPATH" build. 121*5ddc57e5SXin Li 122*5ddc57e5SXin Li With a non-GNU `make', it is safer to compile the package for one 123*5ddc57e5SXin Liarchitecture at a time in the source code directory. After you have 124*5ddc57e5SXin Liinstalled the package for one architecture, use `make distclean' before 125*5ddc57e5SXin Lireconfiguring for another architecture. 126*5ddc57e5SXin Li 127*5ddc57e5SXin Li On MacOS X 10.5 and later systems, you can create libraries and 128*5ddc57e5SXin Liexecutables that work on multiple system types--known as "fat" or 129*5ddc57e5SXin Li"universal" binaries--by specifying multiple `-arch' options to the 130*5ddc57e5SXin Licompiler but only a single `-arch' option to the preprocessor. Like 131*5ddc57e5SXin Lithis: 132*5ddc57e5SXin Li 133*5ddc57e5SXin Li ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134*5ddc57e5SXin Li CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135*5ddc57e5SXin Li CPP="gcc -E" CXXCPP="g++ -E" 136*5ddc57e5SXin Li 137*5ddc57e5SXin Li This is not guaranteed to produce working output in all cases, you 138*5ddc57e5SXin Limay have to build one architecture at a time and combine the results 139*5ddc57e5SXin Liusing the `lipo' tool if you have problems. 140*5ddc57e5SXin Li 141*5ddc57e5SXin LiInstallation Names 142*5ddc57e5SXin Li================== 143*5ddc57e5SXin Li 144*5ddc57e5SXin Li By default, `make install' installs the package's commands under 145*5ddc57e5SXin Li`/usr/local/bin', include files under `/usr/local/include', etc. You 146*5ddc57e5SXin Lican specify an installation prefix other than `/usr/local' by giving 147*5ddc57e5SXin Li`configure' the option `--prefix=PREFIX', where PREFIX must be an 148*5ddc57e5SXin Liabsolute file name. 149*5ddc57e5SXin Li 150*5ddc57e5SXin Li You can specify separate installation prefixes for 151*5ddc57e5SXin Liarchitecture-specific files and architecture-independent files. If you 152*5ddc57e5SXin Lipass the option `--exec-prefix=PREFIX' to `configure', the package uses 153*5ddc57e5SXin LiPREFIX as the prefix for installing programs and libraries. 154*5ddc57e5SXin LiDocumentation and other data files still use the regular prefix. 155*5ddc57e5SXin Li 156*5ddc57e5SXin Li In addition, if you use an unusual directory layout you can give 157*5ddc57e5SXin Lioptions like `--bindir=DIR' to specify different values for particular 158*5ddc57e5SXin Likinds of files. Run `configure --help' for a list of the directories 159*5ddc57e5SXin Liyou can set and what kinds of files go in them. In general, the 160*5ddc57e5SXin Lidefault for these options is expressed in terms of `${prefix}', so that 161*5ddc57e5SXin Lispecifying just `--prefix' will affect all of the other directory 162*5ddc57e5SXin Lispecifications that were not explicitly provided. 163*5ddc57e5SXin Li 164*5ddc57e5SXin Li The most portable way to affect installation locations is to pass the 165*5ddc57e5SXin Licorrect locations to `configure'; however, many packages provide one or 166*5ddc57e5SXin Liboth of the following shortcuts of passing variable assignments to the 167*5ddc57e5SXin Li`make install' command line to change installation locations without 168*5ddc57e5SXin Lihaving to reconfigure or recompile. 169*5ddc57e5SXin Li 170*5ddc57e5SXin Li The first method involves providing an override variable for each 171*5ddc57e5SXin Liaffected directory. For example, `make install 172*5ddc57e5SXin Liprefix=/alternate/directory' will choose an alternate location for all 173*5ddc57e5SXin Lidirectory configuration variables that were expressed in terms of 174*5ddc57e5SXin Li`${prefix}'. Any directories that were specified during `configure', 175*5ddc57e5SXin Libut not in terms of `${prefix}', must each be overridden at install 176*5ddc57e5SXin Litime for the entire installation to be relocated. The approach of 177*5ddc57e5SXin Limakefile variable overrides for each directory variable is required by 178*5ddc57e5SXin Lithe GNU Coding Standards, and ideally causes no recompilation. 179*5ddc57e5SXin LiHowever, some platforms have known limitations with the semantics of 180*5ddc57e5SXin Lishared libraries that end up requiring recompilation when using this 181*5ddc57e5SXin Limethod, particularly noticeable in packages that use GNU Libtool. 182*5ddc57e5SXin Li 183*5ddc57e5SXin Li The second method involves providing the `DESTDIR' variable. For 184*5ddc57e5SXin Liexample, `make install DESTDIR=/alternate/directory' will prepend 185*5ddc57e5SXin Li`/alternate/directory' before all installation names. The approach of 186*5ddc57e5SXin Li`DESTDIR' overrides is not required by the GNU Coding Standards, and 187*5ddc57e5SXin Lidoes not work on platforms that have drive letters. On the other hand, 188*5ddc57e5SXin Liit does better at avoiding recompilation issues, and works well even 189*5ddc57e5SXin Liwhen some directory options were not specified in terms of `${prefix}' 190*5ddc57e5SXin Liat `configure' time. 191*5ddc57e5SXin Li 192*5ddc57e5SXin LiOptional Features 193*5ddc57e5SXin Li================= 194*5ddc57e5SXin Li 195*5ddc57e5SXin Li If the package supports it, you can cause programs to be installed 196*5ddc57e5SXin Liwith an extra prefix or suffix on their names by giving `configure' the 197*5ddc57e5SXin Lioption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198*5ddc57e5SXin Li 199*5ddc57e5SXin Li Some packages pay attention to `--enable-FEATURE' options to 200*5ddc57e5SXin Li`configure', where FEATURE indicates an optional part of the package. 201*5ddc57e5SXin LiThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202*5ddc57e5SXin Liis something like `gnu-as' or `x' (for the X Window System). The 203*5ddc57e5SXin Li`README' should mention any `--enable-' and `--with-' options that the 204*5ddc57e5SXin Lipackage recognizes. 205*5ddc57e5SXin Li 206*5ddc57e5SXin Li For packages that use the X Window System, `configure' can usually 207*5ddc57e5SXin Lifind the X include and library files automatically, but if it doesn't, 208*5ddc57e5SXin Liyou can use the `configure' options `--x-includes=DIR' and 209*5ddc57e5SXin Li`--x-libraries=DIR' to specify their locations. 210*5ddc57e5SXin Li 211*5ddc57e5SXin Li Some packages offer the ability to configure how verbose the 212*5ddc57e5SXin Liexecution of `make' will be. For these packages, running `./configure 213*5ddc57e5SXin Li--enable-silent-rules' sets the default to minimal output, which can be 214*5ddc57e5SXin Lioverridden with `make V=1'; while running `./configure 215*5ddc57e5SXin Li--disable-silent-rules' sets the default to verbose, which can be 216*5ddc57e5SXin Lioverridden with `make V=0'. 217*5ddc57e5SXin Li 218*5ddc57e5SXin LiParticular systems 219*5ddc57e5SXin Li================== 220*5ddc57e5SXin Li 221*5ddc57e5SXin Li On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222*5ddc57e5SXin LiCC is not installed, it is recommended to use the following options in 223*5ddc57e5SXin Liorder to use an ANSI C compiler: 224*5ddc57e5SXin Li 225*5ddc57e5SXin Li ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226*5ddc57e5SXin Li 227*5ddc57e5SXin Liand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228*5ddc57e5SXin Li 229*5ddc57e5SXin Li On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 230*5ddc57e5SXin Liparse its `<wchar.h>' header file. The option `-nodtk' can be used as 231*5ddc57e5SXin Lia workaround. If GNU CC is not installed, it is therefore recommended 232*5ddc57e5SXin Lito try 233*5ddc57e5SXin Li 234*5ddc57e5SXin Li ./configure CC="cc" 235*5ddc57e5SXin Li 236*5ddc57e5SXin Liand if that doesn't work, try 237*5ddc57e5SXin Li 238*5ddc57e5SXin Li ./configure CC="cc -nodtk" 239*5ddc57e5SXin Li 240*5ddc57e5SXin Li On Solaris, don't put `/usr/ucb' early in your `PATH'. This 241*5ddc57e5SXin Lidirectory contains several dysfunctional programs; working variants of 242*5ddc57e5SXin Lithese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 243*5ddc57e5SXin Liin your `PATH', put it _after_ `/usr/bin'. 244*5ddc57e5SXin Li 245*5ddc57e5SXin Li On Haiku, software installed for all users goes in `/boot/common', 246*5ddc57e5SXin Linot `/usr/local'. It is recommended to use the following options: 247*5ddc57e5SXin Li 248*5ddc57e5SXin Li ./configure --prefix=/boot/common 249*5ddc57e5SXin Li 250*5ddc57e5SXin LiSpecifying the System Type 251*5ddc57e5SXin Li========================== 252*5ddc57e5SXin Li 253*5ddc57e5SXin Li There may be some features `configure' cannot figure out 254*5ddc57e5SXin Liautomatically, but needs to determine by the type of machine the package 255*5ddc57e5SXin Liwill run on. Usually, assuming the package is built to be run on the 256*5ddc57e5SXin Li_same_ architectures, `configure' can figure that out, but if it prints 257*5ddc57e5SXin Lia message saying it cannot guess the machine type, give it the 258*5ddc57e5SXin Li`--build=TYPE' option. TYPE can either be a short name for the system 259*5ddc57e5SXin Litype, such as `sun4', or a canonical name which has the form: 260*5ddc57e5SXin Li 261*5ddc57e5SXin Li CPU-COMPANY-SYSTEM 262*5ddc57e5SXin Li 263*5ddc57e5SXin Liwhere SYSTEM can have one of these forms: 264*5ddc57e5SXin Li 265*5ddc57e5SXin Li OS 266*5ddc57e5SXin Li KERNEL-OS 267*5ddc57e5SXin Li 268*5ddc57e5SXin Li See the file `config.sub' for the possible values of each field. If 269*5ddc57e5SXin Li`config.sub' isn't included in this package, then this package doesn't 270*5ddc57e5SXin Lineed to know the machine type. 271*5ddc57e5SXin Li 272*5ddc57e5SXin Li If you are _building_ compiler tools for cross-compiling, you should 273*5ddc57e5SXin Liuse the option `--target=TYPE' to select the type of system they will 274*5ddc57e5SXin Liproduce code for. 275*5ddc57e5SXin Li 276*5ddc57e5SXin Li If you want to _use_ a cross compiler, that generates code for a 277*5ddc57e5SXin Liplatform different from the build platform, you should specify the 278*5ddc57e5SXin Li"host" platform (i.e., that on which the generated programs will 279*5ddc57e5SXin Lieventually be run) with `--host=TYPE'. 280*5ddc57e5SXin Li 281*5ddc57e5SXin LiSharing Defaults 282*5ddc57e5SXin Li================ 283*5ddc57e5SXin Li 284*5ddc57e5SXin Li If you want to set default values for `configure' scripts to share, 285*5ddc57e5SXin Liyou can create a site shell script called `config.site' that gives 286*5ddc57e5SXin Lidefault values for variables like `CC', `cache_file', and `prefix'. 287*5ddc57e5SXin Li`configure' looks for `PREFIX/share/config.site' if it exists, then 288*5ddc57e5SXin Li`PREFIX/etc/config.site' if it exists. Or, you can set the 289*5ddc57e5SXin Li`CONFIG_SITE' environment variable to the location of the site script. 290*5ddc57e5SXin LiA warning: not all `configure' scripts look for a site script. 291*5ddc57e5SXin Li 292*5ddc57e5SXin LiDefining Variables 293*5ddc57e5SXin Li================== 294*5ddc57e5SXin Li 295*5ddc57e5SXin Li Variables not defined in a site shell script can be set in the 296*5ddc57e5SXin Lienvironment passed to `configure'. However, some packages may run 297*5ddc57e5SXin Liconfigure again during the build, and the customized values of these 298*5ddc57e5SXin Livariables may be lost. In order to avoid this problem, you should set 299*5ddc57e5SXin Lithem in the `configure' command line, using `VAR=value'. For example: 300*5ddc57e5SXin Li 301*5ddc57e5SXin Li ./configure CC=/usr/local2/bin/gcc 302*5ddc57e5SXin Li 303*5ddc57e5SXin Licauses the specified `gcc' to be used as the C compiler (unless it is 304*5ddc57e5SXin Lioverridden in the site shell script). 305*5ddc57e5SXin Li 306*5ddc57e5SXin LiUnfortunately, this technique does not work for `CONFIG_SHELL' due to 307*5ddc57e5SXin Lian Autoconf bug. Until the bug is fixed you can use this workaround: 308*5ddc57e5SXin Li 309*5ddc57e5SXin Li CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 310*5ddc57e5SXin Li 311*5ddc57e5SXin Li`configure' Invocation 312*5ddc57e5SXin Li====================== 313*5ddc57e5SXin Li 314*5ddc57e5SXin Li `configure' recognizes the following options to control how it 315*5ddc57e5SXin Lioperates. 316*5ddc57e5SXin Li 317*5ddc57e5SXin Li`--help' 318*5ddc57e5SXin Li`-h' 319*5ddc57e5SXin Li Print a summary of all of the options to `configure', and exit. 320*5ddc57e5SXin Li 321*5ddc57e5SXin Li`--help=short' 322*5ddc57e5SXin Li`--help=recursive' 323*5ddc57e5SXin Li Print a summary of the options unique to this package's 324*5ddc57e5SXin Li `configure', and exit. The `short' variant lists options used 325*5ddc57e5SXin Li only in the top level, while the `recursive' variant lists options 326*5ddc57e5SXin Li also present in any nested packages. 327*5ddc57e5SXin Li 328*5ddc57e5SXin Li`--version' 329*5ddc57e5SXin Li`-V' 330*5ddc57e5SXin Li Print the version of Autoconf used to generate the `configure' 331*5ddc57e5SXin Li script, and exit. 332*5ddc57e5SXin Li 333*5ddc57e5SXin Li`--cache-file=FILE' 334*5ddc57e5SXin Li Enable the cache: use and save the results of the tests in FILE, 335*5ddc57e5SXin Li traditionally `config.cache'. FILE defaults to `/dev/null' to 336*5ddc57e5SXin Li disable caching. 337*5ddc57e5SXin Li 338*5ddc57e5SXin Li`--config-cache' 339*5ddc57e5SXin Li`-C' 340*5ddc57e5SXin Li Alias for `--cache-file=config.cache'. 341*5ddc57e5SXin Li 342*5ddc57e5SXin Li`--quiet' 343*5ddc57e5SXin Li`--silent' 344*5ddc57e5SXin Li`-q' 345*5ddc57e5SXin Li Do not print messages saying which checks are being made. To 346*5ddc57e5SXin Li suppress all normal output, redirect it to `/dev/null' (any error 347*5ddc57e5SXin Li messages will still be shown). 348*5ddc57e5SXin Li 349*5ddc57e5SXin Li`--srcdir=DIR' 350*5ddc57e5SXin Li Look for the package's source code in directory DIR. Usually 351*5ddc57e5SXin Li `configure' can determine that directory automatically. 352*5ddc57e5SXin Li 353*5ddc57e5SXin Li`--prefix=DIR' 354*5ddc57e5SXin Li Use DIR as the installation prefix. *note Installation Names:: 355*5ddc57e5SXin Li for more details, including other options available for fine-tuning 356*5ddc57e5SXin Li the installation locations. 357*5ddc57e5SXin Li 358*5ddc57e5SXin Li`--no-create' 359*5ddc57e5SXin Li`-n' 360*5ddc57e5SXin Li Run the configure checks, but stop before creating any output 361*5ddc57e5SXin Li files. 362*5ddc57e5SXin Li 363*5ddc57e5SXin Li`configure' also accepts some other, not widely useful, options. Run 364*5ddc57e5SXin Li`configure --help' for more details. 365*5ddc57e5SXin Li 366