INSTALL revision 4028d71e
14028d71eSmrgInstallation Instructions
24028d71eSmrg*************************
34028d71eSmrg
44028d71eSmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
54028d71eSmrg2006, 2007, 2008 Free Software Foundation, Inc.
64028d71eSmrg
74028d71eSmrg   This file is free documentation; the Free Software Foundation gives
84028d71eSmrgunlimited permission to copy, distribute and modify it.
94028d71eSmrg
104028d71eSmrgBasic Installation
114028d71eSmrg==================
124028d71eSmrg
134028d71eSmrg   Briefly, the shell commands `./configure; make; make install' should
144028d71eSmrgconfigure, build, and install this package.  The following
154028d71eSmrgmore-detailed instructions are generic; see the `README' file for
164028d71eSmrginstructions specific to this package.
174028d71eSmrg
184028d71eSmrg   The `configure' shell script attempts to guess correct values for
194028d71eSmrgvarious system-dependent variables used during compilation.  It uses
204028d71eSmrgthose values to create a `Makefile' in each directory of the package.
214028d71eSmrgIt may also create one or more `.h' files containing system-dependent
224028d71eSmrgdefinitions.  Finally, it creates a shell script `config.status' that
234028d71eSmrgyou can run in the future to recreate the current configuration, and a
244028d71eSmrgfile `config.log' containing compiler output (useful mainly for
254028d71eSmrgdebugging `configure').
264028d71eSmrg
274028d71eSmrg   It can also use an optional file (typically called `config.cache'
284028d71eSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
294028d71eSmrgthe results of its tests to speed up reconfiguring.  Caching is
304028d71eSmrgdisabled by default to prevent problems with accidental use of stale
314028d71eSmrgcache files.
324028d71eSmrg
334028d71eSmrg   If you need to do unusual things to compile the package, please try
344028d71eSmrgto figure out how `configure' could check whether to do them, and mail
354028d71eSmrgdiffs or instructions to the address given in the `README' so they can
364028d71eSmrgbe considered for the next release.  If you are using the cache, and at
374028d71eSmrgsome point `config.cache' contains results you don't want to keep, you
384028d71eSmrgmay remove or edit it.
394028d71eSmrg
404028d71eSmrg   The file `configure.ac' (or `configure.in') is used to create
414028d71eSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
424028d71eSmrgyou want to change it or regenerate `configure' using a newer version
434028d71eSmrgof `autoconf'.
444028d71eSmrg
454028d71eSmrgThe simplest way to compile this package is:
464028d71eSmrg
474028d71eSmrg  1. `cd' to the directory containing the package's source code and type
484028d71eSmrg     `./configure' to configure the package for your system.
494028d71eSmrg
504028d71eSmrg     Running `configure' might take a while.  While running, it prints
514028d71eSmrg     some messages telling which features it is checking for.
524028d71eSmrg
534028d71eSmrg  2. Type `make' to compile the package.
544028d71eSmrg
554028d71eSmrg  3. Optionally, type `make check' to run any self-tests that come with
564028d71eSmrg     the package.
574028d71eSmrg
584028d71eSmrg  4. Type `make install' to install the programs and any data files and
594028d71eSmrg     documentation.
604028d71eSmrg
614028d71eSmrg  5. You can remove the program binaries and object files from the
624028d71eSmrg     source code directory by typing `make clean'.  To also remove the
634028d71eSmrg     files that `configure' created (so you can compile the package for
644028d71eSmrg     a different kind of computer), type `make distclean'.  There is
654028d71eSmrg     also a `make maintainer-clean' target, but that is intended mainly
664028d71eSmrg     for the package's developers.  If you use it, you may have to get
674028d71eSmrg     all sorts of other programs in order to regenerate files that came
684028d71eSmrg     with the distribution.
694028d71eSmrg
704028d71eSmrg  6. Often, you can also type `make uninstall' to remove the installed
714028d71eSmrg     files again.
724028d71eSmrg
734028d71eSmrgCompilers and Options
744028d71eSmrg=====================
754028d71eSmrg
764028d71eSmrg   Some systems require unusual options for compilation or linking that
774028d71eSmrgthe `configure' script does not know about.  Run `./configure --help'
784028d71eSmrgfor details on some of the pertinent environment variables.
794028d71eSmrg
804028d71eSmrg   You can give `configure' initial values for configuration parameters
814028d71eSmrgby setting variables in the command line or in the environment.  Here
824028d71eSmrgis an example:
834028d71eSmrg
844028d71eSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
854028d71eSmrg
864028d71eSmrg   *Note Defining Variables::, for more details.
874028d71eSmrg
884028d71eSmrgCompiling For Multiple Architectures
894028d71eSmrg====================================
904028d71eSmrg
914028d71eSmrg   You can compile the package for more than one kind of computer at the
924028d71eSmrgsame time, by placing the object files for each architecture in their
934028d71eSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
944028d71eSmrgdirectory where you want the object files and executables to go and run
954028d71eSmrgthe `configure' script.  `configure' automatically checks for the
964028d71eSmrgsource code in the directory that `configure' is in and in `..'.
974028d71eSmrg
984028d71eSmrg   With a non-GNU `make', it is safer to compile the package for one
994028d71eSmrgarchitecture at a time in the source code directory.  After you have
1004028d71eSmrginstalled the package for one architecture, use `make distclean' before
1014028d71eSmrgreconfiguring for another architecture.
1024028d71eSmrg
1034028d71eSmrg   On MacOS X 10.5 and later systems, you can create libraries and
1044028d71eSmrgexecutables that work on multiple system types--known as "fat" or
1054028d71eSmrg"universal" binaries--by specifying multiple `-arch' options to the
1064028d71eSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
1074028d71eSmrgthis:
1084028d71eSmrg
1094028d71eSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1104028d71eSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1114028d71eSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
1124028d71eSmrg
1134028d71eSmrg   This is not guaranteed to produce working output in all cases, you
1144028d71eSmrgmay have to build one architecture at a time and combine the results
1154028d71eSmrgusing the `lipo' tool if you have problems.
1164028d71eSmrg
1174028d71eSmrgInstallation Names
1184028d71eSmrg==================
1194028d71eSmrg
1204028d71eSmrg   By default, `make install' installs the package's commands under
1214028d71eSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1224028d71eSmrgcan specify an installation prefix other than `/usr/local' by giving
1234028d71eSmrg`configure' the option `--prefix=PREFIX'.
1244028d71eSmrg
1254028d71eSmrg   You can specify separate installation prefixes for
1264028d71eSmrgarchitecture-specific files and architecture-independent files.  If you
1274028d71eSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1284028d71eSmrgPREFIX as the prefix for installing programs and libraries.
1294028d71eSmrgDocumentation and other data files still use the regular prefix.
1304028d71eSmrg
1314028d71eSmrg   In addition, if you use an unusual directory layout you can give
1324028d71eSmrgoptions like `--bindir=DIR' to specify different values for particular
1334028d71eSmrgkinds of files.  Run `configure --help' for a list of the directories
1344028d71eSmrgyou can set and what kinds of files go in them.
1354028d71eSmrg
1364028d71eSmrg   If the package supports it, you can cause programs to be installed
1374028d71eSmrgwith an extra prefix or suffix on their names by giving `configure' the
1384028d71eSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1394028d71eSmrg
1404028d71eSmrgOptional Features
1414028d71eSmrg=================
1424028d71eSmrg
1434028d71eSmrg   Some packages pay attention to `--enable-FEATURE' options to
1444028d71eSmrg`configure', where FEATURE indicates an optional part of the package.
1454028d71eSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
1464028d71eSmrgis something like `gnu-as' or `x' (for the X Window System).  The
1474028d71eSmrg`README' should mention any `--enable-' and `--with-' options that the
1484028d71eSmrgpackage recognizes.
1494028d71eSmrg
1504028d71eSmrg   For packages that use the X Window System, `configure' can usually
1514028d71eSmrgfind the X include and library files automatically, but if it doesn't,
1524028d71eSmrgyou can use the `configure' options `--x-includes=DIR' and
1534028d71eSmrg`--x-libraries=DIR' to specify their locations.
1544028d71eSmrg
1554028d71eSmrgParticular systems
1564028d71eSmrg==================
1574028d71eSmrg
1584028d71eSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
1594028d71eSmrgCC is not installed, it is recommended to use the following options in
1604028d71eSmrgorder to use an ANSI C compiler:
1614028d71eSmrg
1624028d71eSmrg     ./configure CC="cc -Ae"
1634028d71eSmrg
1644028d71eSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
1654028d71eSmrg
1664028d71eSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
1674028d71eSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
1684028d71eSmrga workaround.  If GNU CC is not installed, it is therefore recommended
1694028d71eSmrgto try
1704028d71eSmrg
1714028d71eSmrg     ./configure CC="cc"
1724028d71eSmrg
1734028d71eSmrgand if that doesn't work, try
1744028d71eSmrg
1754028d71eSmrg     ./configure CC="cc -nodtk"
1764028d71eSmrg
1774028d71eSmrgSpecifying the System Type
1784028d71eSmrg==========================
1794028d71eSmrg
1804028d71eSmrg   There may be some features `configure' cannot figure out
1814028d71eSmrgautomatically, but needs to determine by the type of machine the package
1824028d71eSmrgwill run on.  Usually, assuming the package is built to be run on the
1834028d71eSmrg_same_ architectures, `configure' can figure that out, but if it prints
1844028d71eSmrga message saying it cannot guess the machine type, give it the
1854028d71eSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
1864028d71eSmrgtype, such as `sun4', or a canonical name which has the form:
1874028d71eSmrg
1884028d71eSmrg     CPU-COMPANY-SYSTEM
1894028d71eSmrg
1904028d71eSmrgwhere SYSTEM can have one of these forms:
1914028d71eSmrg
1924028d71eSmrg     OS KERNEL-OS
1934028d71eSmrg
1944028d71eSmrg   See the file `config.sub' for the possible values of each field.  If
1954028d71eSmrg`config.sub' isn't included in this package, then this package doesn't
1964028d71eSmrgneed to know the machine type.
1974028d71eSmrg
1984028d71eSmrg   If you are _building_ compiler tools for cross-compiling, you should
1994028d71eSmrguse the option `--target=TYPE' to select the type of system they will
2004028d71eSmrgproduce code for.
2014028d71eSmrg
2024028d71eSmrg   If you want to _use_ a cross compiler, that generates code for a
2034028d71eSmrgplatform different from the build platform, you should specify the
2044028d71eSmrg"host" platform (i.e., that on which the generated programs will
2054028d71eSmrgeventually be run) with `--host=TYPE'.
2064028d71eSmrg
2074028d71eSmrgSharing Defaults
2084028d71eSmrg================
2094028d71eSmrg
2104028d71eSmrg   If you want to set default values for `configure' scripts to share,
2114028d71eSmrgyou can create a site shell script called `config.site' that gives
2124028d71eSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
2134028d71eSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2144028d71eSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2154028d71eSmrg`CONFIG_SITE' environment variable to the location of the site script.
2164028d71eSmrgA warning: not all `configure' scripts look for a site script.
2174028d71eSmrg
2184028d71eSmrgDefining Variables
2194028d71eSmrg==================
2204028d71eSmrg
2214028d71eSmrg   Variables not defined in a site shell script can be set in the
2224028d71eSmrgenvironment passed to `configure'.  However, some packages may run
2234028d71eSmrgconfigure again during the build, and the customized values of these
2244028d71eSmrgvariables may be lost.  In order to avoid this problem, you should set
2254028d71eSmrgthem in the `configure' command line, using `VAR=value'.  For example:
2264028d71eSmrg
2274028d71eSmrg     ./configure CC=/usr/local2/bin/gcc
2284028d71eSmrg
2294028d71eSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
2304028d71eSmrgoverridden in the site shell script).
2314028d71eSmrg
2324028d71eSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
2334028d71eSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
2344028d71eSmrg
2354028d71eSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
2364028d71eSmrg
2374028d71eSmrg`configure' Invocation
2384028d71eSmrg======================
2394028d71eSmrg
2404028d71eSmrg   `configure' recognizes the following options to control how it
2414028d71eSmrgoperates.
2424028d71eSmrg
2434028d71eSmrg`--help'
2444028d71eSmrg`-h'
2454028d71eSmrg     Print a summary of all of the options to `configure', and exit.
2464028d71eSmrg
2474028d71eSmrg`--help=short'
2484028d71eSmrg`--help=recursive'
2494028d71eSmrg     Print a summary of the options unique to this package's
2504028d71eSmrg     `configure', and exit.  The `short' variant lists options used
2514028d71eSmrg     only in the top level, while the `recursive' variant lists options
2524028d71eSmrg     also present in any nested packages.
2534028d71eSmrg
2544028d71eSmrg`--version'
2554028d71eSmrg`-V'
2564028d71eSmrg     Print the version of Autoconf used to generate the `configure'
2574028d71eSmrg     script, and exit.
2584028d71eSmrg
2594028d71eSmrg`--cache-file=FILE'
2604028d71eSmrg     Enable the cache: use and save the results of the tests in FILE,
2614028d71eSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
2624028d71eSmrg     disable caching.
2634028d71eSmrg
2644028d71eSmrg`--config-cache'
2654028d71eSmrg`-C'
2664028d71eSmrg     Alias for `--cache-file=config.cache'.
2674028d71eSmrg
2684028d71eSmrg`--quiet'
2694028d71eSmrg`--silent'
2704028d71eSmrg`-q'
2714028d71eSmrg     Do not print messages saying which checks are being made.  To
2724028d71eSmrg     suppress all normal output, redirect it to `/dev/null' (any error
2734028d71eSmrg     messages will still be shown).
2744028d71eSmrg
2754028d71eSmrg`--srcdir=DIR'
2764028d71eSmrg     Look for the package's source code in directory DIR.  Usually
2774028d71eSmrg     `configure' can determine that directory automatically.
2784028d71eSmrg
2794028d71eSmrg`--prefix=DIR'
2804028d71eSmrg     Use DIR as the installation prefix.  *Note Installation Names::
2814028d71eSmrg     for more details, including other options available for fine-tuning
2824028d71eSmrg     the installation locations.
2834028d71eSmrg
2844028d71eSmrg`--no-create'
2854028d71eSmrg`-n'
2864028d71eSmrg     Run the configure checks, but stop before creating any output
2874028d71eSmrg     files.
2884028d71eSmrg
2894028d71eSmrg`configure' also accepts some other, not widely useful, options.  Run
2904028d71eSmrg`configure --help' for more details.
2914028d71eSmrg
292