manpagez: man pages & more
info autoconf
Home | html | info | man

File: autoconf.info,  Node: Basic Installation,  Next: Compilers and Options,  Up: Running configure Scripts

16.1 Basic Installation
=======================

The following shell commands:

     test -f configure || ./bootstrap
     ./configure
     make
     make install

should configure, build, and install this package.  The first line,
which bootstraps, is intended for developers; when building from
distribution tarballs it does nothing and can be skipped.

   The following more-detailed instructions are generic; see the
‘README’ file for instructions specific to this package.  More
recommendations for GNU packages can be found in *note Makefile
Conventions: (standards)Makefile Conventions.

   Many packages have scripts meant for developers instead of ordinary
builders, as they may use developer tools that are less commonly
installed, or they may access the network, which has privacy
implications.  If the ‘bootstrap’ shell script exists, it attempts to
build the ‘configure’ shell script and related files, possibly using
developer tools or the network.  Because the output of ‘bootstrap’ is
system-independent, it is normally run by a package developer so that
its output can be put into the distribution tarball and ordinary
builders and users need not run ‘bootstrap’.  Some packages have
commands like ‘./autopull.sh’ and ‘./autogen.sh’ that you can run
instead of ‘./bootstrap’, for more fine-grained control over
bootstrapping.

   The ‘configure’ shell script attempts to guess correct values for
various system-dependent variables used during compilation.  It uses
those values to create a ‘Makefile’ in each directory of the package.
It may also create one or more ‘.h’ files containing system-dependent
definitions.  Finally, it creates a shell script ‘config.status’ that
you can run in the future to recreate the current configuration, and a
file ‘config.log’ containing output useful for debugging ‘configure’.

   It can also use an optional file (typically called ‘config.cache’ and
enabled with ‘--cache-file=config.cache’ or simply ‘-C’) that saves the
results of its tests to speed up reconfiguring.  Caching is disabled by
default to prevent problems with accidental use of stale cache files.

   If you need to do unusual things to compile the package, please try
to figure out how ‘configure’ could check whether to do them, and mail
diffs or instructions to the address given in the ‘README’ so they can
be considered for the next release.  If you are using the cache, and at
some point ‘config.cache’ contains results you don't want to keep, you
may remove or edit it.

   The ‘autoconf’ program generates ‘configure’ from the file
‘configure.ac’.  Normally you should edit ‘configure.ac’ instead of
editing ‘configure’ directly.

   The simplest way to compile this package is:

  1. ‘cd’ to the directory containing the package's source code.

  2. If this is a developer checkout and file ‘configure’ does not yet
     exist, type ‘./bootstrap’ to create it.  You may need special
     developer tools and network access to bootstrap, and the network
     access may have privacy implications.

  3. Type ‘./configure’ to configure the package for your system.  This
     might take a while.  While running, ‘configure’ prints messages
     telling which features it is checking for.

  4. Type ‘make’ to compile the package.

  5. Optionally, type ‘make check’ to run any self-tests that come with
     the package, generally using the just-built uninstalled binaries.

  6. Type ‘make install’ to install the programs and any data files and
     documentation.  When installing into a prefix owned by root, it is
     recommended that the package be configured and built as a regular
     user, and only the ‘make install’ phase executed with root
     privileges.

  7. Optionally, type ‘make installcheck’ to repeat any self-tests, but
     this time using the binaries in their final installed location.
     This target does not install anything.  Running this target as a
     regular user, particularly if the prior ‘make install’ required
     root privileges, verifies that the installation completed
     correctly.

  8. You can remove the program binaries and object files from the
     source code directory by typing ‘make clean’.  To also remove the
     files that ‘configure’ created (so you can compile the package for
     a different kind of computer), type ‘make distclean’.  There is
     also a ‘make maintainer-clean’ target, but that is intended mainly
     for the package's developers.  If you use it, you may have to
     bootstrap again.

  9. If the package follows the GNU Coding Standards, you can type ‘make
     uninstall’ to remove the installed files.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.