NetBSD/gnu/dist/etc/configure.info-2

567 lines
26 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This is Info file configure.info, produced by Makeinfo-1.64 from the
input file ./configure.texi.
START-INFO-DIR-ENTRY
* configure: (configure). Cygnus configure.
END-INFO-DIR-ENTRY
This document describes the Cygnus Support version of `configure'.
Copyright (C) 1991, 1992, 1993 Cygnus Support Permission is granted
to make and distribute verbatim copies of this manual provided the
copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by Cygnus Support.

File: configure.info, Node: Makefile fragments, Next: Makefile extensions, Prev: Target, Up: Using configure
Adding information about local conventions
==========================================
If you find that a tool does not get configured to your liking, or if
`configure''s conventions differ from your local conventions, you should
probably consider "site-specific `Makefile' fragments". See also *Note
Adding site info: Sites.
These are probably not the right choice for options that can be set
from the `configure' command line or for differences that are host or
target dependent.
Cygnus `configure' uses three types of `Makefile' fragments. In a
generated `Makefile' they appear in the order: "target fragment", "host
fragment", and "site fragment". This allows host fragments to override
target fragments, and site fragments to override both.
Host-specific `Makefile' fragments conventionally reside in the
`./config/' subdirectory with names of the form `mh-HOSTTYPE'. They
are used for hosts that require odd options to the standard compiler and
for compile time options based on the host configuration.
Target-specific `Makefile' fragments conventionally reside in the
`./config/' subdirectory with names of the form `mt-TARGET'. They are
used for target dependent compile time options.
Site specific `Makefile' fragments conventionally reside in the
`./config/' subdirectory with names of the form `ms-SITE'. They are
used to override host- and target-independent compile time options.
Note that you can also override these options on the `make' invocation
line.

File: configure.info, Node: Makefile extensions, Prev: Makefile fragments, Up: Using configure
Extensions to the GNU coding standards
======================================
The following additions to the GNU coding standards are required for
Cygnus `configure' to work properly.
* The `Makefile' must contain exactly one line starting with `####'.
This line should follow any default macro definitions but precede
any rules. Host, target, and site-specific `Makefile' fragments
will be inserted immediately after this line. If the line is
missing, the fragments will not be inserted.
* Cygnus adds the following targets to each `Makefile'. Their
existence is not required for Cygnus `configure', but they are
documented here for completeness.
`info'
Build all info files from texinfo source.
`install-info'
Install all info files.
`clean-info'
Remove all info files and any intermediate files that can be
generated from texinfo source.
`Makefile'
Calls `./config.status' to rebuild the `Makefile' in this
directory.
* The following `Makefile' targets have revised semantics:
`install'
Should *not* depend on the target `all'. If the program is
not already built, `make install' should fail. This allows
you to install programs even when `make' would otherwise
determine them to be out of date. This can happen, for
example, when the result of a `make all' is transported via
tape to another machine for installation.
`clean'
Should remove any file that can be regenerated by the
`Makefile', excepting only the `Makefile' itself, and any
links created by `configure'. That is, `make all clean'
should return all directories to their original condition.
If this is not done, then the command sequence
configure HOST1 ; make all install clean ;
configure HOST2 ; make all install
will fail because of intermediate files intended for HOST1.
* Cygnus adds the following macros to all `Makefile.in' files, but
you are not required to use them to run Cygnus `configure'.
`docdir'
The directory in which to install any documentation that is
not either a `man' page or an `info' file. For `man' pages,
see `mandir'; for `info', see `infodir'.
`includedir'
The directory in which to install any header files that
should be made available to users. This is distinct from the
`gcc' include directory, which is intended for `gcc' only.
Files in `includedir' may be used by `cc' as well.
* The following macros have revised semantics. Most of them describe
installation directories; see also *Note Full description of all
installation subdirectories: Install details.
`datadir'
is used for host independent data files.
`mandir'
The default path for `mandir' depends on `prefix'.
`infodir'
The default path for `infodir' depends on `prefix'.
`BISON'
is assumed to have a `yacc' calling convention. To use GNU
`bison', use `BISON=bison -y'.
* Each Cygnus `Makefile' also conforms to one additional restriction:
When libraries are installed, the line containing the call to
`INSTALL_DATA' should always be followed by a line containing a
call to `RANLIB' on the installed library. This is to accommodate
systems that use `ranlib'. Systems that do not use `ranlib' can
set `RANLIB' to "`echo'" in a host specific `Makefile' fragment.

File: configure.info, Node: Porting, Next: Variables Index, Prev: Using configure, Up: Top
Porting with `configure'
************************
This section explains how to add programs, host and target
configuration names, and site-specific information to Cygnus
`configure'.
* Menu:
* Programs:: Adding configure to new programs
* Hosts and targets:: Adding hosts and targets
* Sites:: Adding site info

File: configure.info, Node: Programs, Next: Hosts and targets, Up: Porting
Adding `configure' to new programs
==================================
If you are writing a new program, you probably shouldn't worry about
porting or configuration issues until it is running reasonably on some
host. Then refer back to this section.
If your program currently has a `configure' script that meets the GNU
standards (*note How Configuration Should Work:
(standards)Configuration., please do not add Cygnus `configure'. It
should be possible to add this program without change to a Cygnus
`configure' style source tree.
If the program is not target dependent, please consider using
`autoconf' instead of Cygnus `configure'. `autoconf' is available from
the Free Software Foundation; it is a program which generates an
executable shell script called `configure' by automatically finding
information on the system to be configured on and embedding this
information in the shell script. `configure' scripts generated by
`autoconf' require no arguments, and accept the same options as Cygnus
`configure'. For detailed instructions on using `autoconf', see *Note
How to organize and produce Autoconf scripts: (autoconf)Making
configure Scripts.
To add Cygnus `configure' to an existing program, do the following:
*Make sure the `Makefile' conforms to the GNU standard
The coding standard for writing a GNU `Makefile' is described in
*Note Makefile Conventions: (standards)Makefiles. For technical
information on writing a `Makefile', see *Note Writing Makefiles:
(make)Makefiles.
*Add Cygnus extensions to the `Makefile'
These are described in *Note Extensions to the GNU coding
standards: Makefile extensions.
*Collect package specific definitions in a single file
Many packages are best configured using a common `Makefile'
fragment which is included by all of the makefiles in the
different directories of the package. In order to accomplish
this, set the variable `package_makefile_fragment' to the name of
the file. It will be inserted into the final `Makefile' before
the target-specific fragment.
*Move host support from `Makefile' to fragments
This usually involves finding sections of the `Makefile' that say
things like "uncomment these lines for host HOSTTYPE" and moving
them to a new file called `./config/mh-HOSTTYPE'. For more
information, see *Note Adding hosts and targets: Hosts and targets.
*Choose defaults
If the program has compile-time options that determine the way the
program should behave, choose reasonable defaults and make these
`Makefile' variables. Be sure the variables are assigned their
default values before the `####' line so that site-specific
`Makefile' fragments can override them (*note Extensions to the
GNU coding standards: Makefile extensions.).
*Locate configuration files
If there is configuration information in header files or source
files, separate it in such a way that the files have generic
names. Then move the specific instances of those files into the
`./config/' subdirectory.
*Separate host and target information
Some programs already have this information separated. If yours
does not, you will need to separate these two kinds of
configuration information. "Host specific" information is the
information needed to compile the program. "Target specific"
information is information on the format of data files that the
program will read or write. This information should live in
separate files in the `./config/' subdirectory with names that
reflect the configuration for which they are intended.
At this point you might skip this step and simply move on. If you
do, you should end up with a program that can be configured only
to build "native" tools, that is, tools for which the host system
is also the target system. Later, you could attempt to build a
cross tool and separate out the target-specific information by
figuring out what went wrong. This is often simpler than combing
through all of the source code.
*Write `configure.in'
Usually this involves writing shell script fragments to map from
canonical configuration names into the names of the configuration
files. These files will then be linked at configure time from the
specific instances of those files in `./config' to files in the
build directory with more generic names. (See also *Note Build
directories: Build directories.) The format of `configure.in' is
described in *Note The `configure.in' input file: configure.in.
*Rename `Makefile' to `Makefile.in'
At this point you should have a program that can be configured using
Cygnus `configure'.

File: configure.info, Node: Hosts and targets, Next: Sites, Prev: Programs, Up: Porting
Adding hosts and targets
========================
To add a host or target to a program that already uses Cygnus
`configure', do the following.
* Make sure the new configuration name is represented in
`config.sub'. If not, add it. For more details, see the comments
in the shell script `config.sub'.
* If you are adding a host configuration, look in `configure.in', in
the "per-host" section. Make sure that your configuration name is
represented in the mapping from host configuration names to
configuration files. If not, add it. Also see *Note The
`configure.in' input file: configure.in.
* If you are adding a target configuration, look in `configure.in',
in the "per-target" section. Make sure that your configuration
name is represented in the mapping from target configuration names
to configuration files. If not, add it. Also see *Note The
`configure.in' input file: configure.in.
* Look in `configure.in' for the variables `files', `links',
`host_makefile_frag', and `target_makefile_frag'. The values
assigned to these variables are the names of the configuration
files, (relative to `srcdir') that the program uses. Make sure
that copies of the files exist for your host. If not, create
them. See also *Note Variables available to `configure.in':
configure variables.
This should be enough to `configure' for a new host or target
configuration name. Getting the program to compile and run properly
represents the hardest work of any port.

File: configure.info, Node: Sites, Prev: Hosts and targets, Up: Porting
Adding site info
================
If some of the `Makefile' defaults are not right for your site, you
can build site-specific `Makefile' fragments. To do this, do the
following.
* Choose a name for your site. It must currently be less than
eleven characters.
* If the program source does not have a `./config/' subdirectory,
create it.
* Create a file called `./config/ms-SITE' where SITE is the name of
your site. In it, set whatever `Makefile' variables you need to
override to match your site's conventions.
* Configure the program with:
configure ... --site=SITE

File: configure.info, Node: Variables Index, Next: Concept Index, Prev: Porting, Up: Top
Variable Index
**************
* Menu:
* bindir: Install details.
* configdirs: configure variables.
* disable-FEATURE: Invoking configure.
* docdir: Install details.
* enable-FEATURE: Invoking configure.
* exec-prefix: Invoking configure.
* exec_prefix <1>: exec_prefix.
* exec_prefix: Install details.
* files: configure variables.
* floating_point: configure variables.
* gas: configure variables.
* host: configure variables.
* host_cpu: configure variables.
* host_makefile_frag: configure variables.
* host_os: configure variables.
* host_vendor: configure variables.
* includedir: Install details.
* infodir: Install details.
* libdir: Install details.
* links: configure variables.
* Makefile: configure variables.
* manNdir: Install details.
* manNext: Install details.
* mandir: Install details.
* nfp: Invoking configure.
* norecursion: Invoking configure.
* package_makefile_frag: configure variables.
* prefix <1>: prefix.
* prefix <2>: Install details.
* prefix: Invoking configure.
* program-prefix: Invoking configure.
* removing: configure variables.
* rm: Invoking configure.
* site: Invoking configure.
* site_makefile_frag: configure variables.
* srcdir <1>: configure variables.
* srcdir <2>: What configure does.
* srcdir: Invoking configure.
* srcname: configure variables.
* srctrigger: configure variables.
* subdirs: configure variables.
* target <1>: Invoking configure.
* target: configure variables.
* target_cpu: configure variables.
* target_makefile_frag: configure variables.
* target_os: configure variables.
* target_vendor: configure variables.
* tmpdir: Invoking configure.
* verbose: Invoking configure.
* with-PACKAGE: Invoking configure.
* without-PACKAGE: Invoking configure.

File: configure.info, Node: Concept Index, Prev: Variables Index, Up: Top
Concept Index
*************
* Menu:
* -disable-FEATURE: Invoking configure.
* -enable-FEATURE: Invoking configure.
* -exec-prefix: Invoking configure.
* -help: Invoking configure.
* -nfp: Invoking configure.
* -norecursion: Invoking configure.
* -prefix: Invoking configure.
* -program-prefix: Invoking configure.
* -rm: Invoking configure.
* -site: Invoking configure.
* -srcdir: Invoking configure.
* -target: Invoking configure.
* -tmpdir: Invoking configure.
* -verbose: Invoking configure.
* -version: Invoking configure.
* -with-PACKAGE: Invoking configure.
* -without-PACKAGE: Invoking configure.
* -s: Invoking configure.
* -v: Invoking configure.
* .gdbinit: What configure does.
* autoconf: Programs.
* bindir: Install details.
* config.guess: config.guess.
* config.guess definition: What configure really does.
* config.status <1>: config.status.
* config.status: What configure does.
* config.status definition: What configure really does.
* config.sub definition: What configure really does.
* config/ subdirectory: What configure really does.
* configdirs: configure variables.
* configure.in: configure.in.
* configure.in definition: What configure really does.
* configure back end: What configure really does.
* configure details: What configure really does.
* disable-FEATURE option: Invoking configure.
* docdir: Install details.
* enable-FEATURE option: Invoking configure.
* exec-prefix option: Invoking configure.
* exec_prefix: Install details.
* floating_point: configure variables.
* help option: Invoking configure.
* host: configure variables.
* includedir: Install details.
* infodir: Install details.
* libdir: Install details.
* Makefile.in definition: What configure really does.
* Makefile extensions: Makefile extensions.
* Makefile fragments: Makefile fragments.
* Makefile generation <1>: Makefile generation.
* Makefile generation: What configure does.
* manNdir: Install details.
* manNext: Install details.
* mandir: Install details.
* nfp option <1>: Invoking configure.
* nfp option: configure variables.
* norecursion option: Invoking configure.
* prefix: Install details.
* prefix option <1>: Invoking configure.
* prefix option: prefix.
* program-prefix option: Invoking configure.
* rm option <1>: Invoking configure.
* rm option: configure variables.
* site option: Invoking configure.
* srcdir <1>: configure variables.
* srcdir: What configure does.
* srcdir option: Invoking configure.
* srcname: configure variables.
* srctrigger: configure variables.
* subdirs: configure variables.
* s option: Invoking configure.
* target: configure variables.
* target option: Invoking configure.
* tmpdir option: Invoking configure.
* verbose option: Invoking configure.
* v option: Invoking configure.
* with-PACKAGE option: Invoking configure.
* with-gnu-as option: configure variables.
* without-PACKAGE option: Invoking configure.
* configure.in interface: configure variables.
* host shell-script fragment: per-host.
* per-host section <1>: per-host.
* per-host section: configure.in.
* per-invocation section <1>: configure.in.
* per-invocation section: Declarations.
* per-target section <1>: configure.in.
* per-target section: per-target.
* post-target section <1>: configure.in.
* post-target section: post-target.
* Abbreviating option names: Invoking configure.
* Adding configure to new programs: Programs.
* Adding hosts and targets: Hosts and targets.
* Adding local info: Makefile fragments.
* Adding site info <1>: Sites.
* Adding site info: Makefile fragments.
* Behind the scenes: What configure really does.
* BISON: Makefile extensions.
* Build directories <1>: What configure does.
* Build directories: Build directories.
* Build variables: Build variables.
* Building for multiple hosts: Build directories.
* Building for multiple targets: Build directories.
* Canonical "triple": configure variables.
* Changing the install directory: prefix.
* clean: Makefile extensions.
* clean-info: Makefile extensions.
* Coding standards extensions: Makefile extensions.
* configure variables: configure variables.
* Configuring for multiple hosts: exec_prefix.
* Cygnus extensions: Makefile extensions.
* Cygnus Support Developer's Kit <1>: What configure does.
* Cygnus Support Developer's Kit: Build variables.
* datadir: Makefile extensions.
* Declarations section: Declarations.
* Default configuration: Makefile generation.
* Detailed usage: Using configure.
* docdir: Makefile extensions.
* Example configure.in: Example.
* Example session <1>: Build directories.
* Example session <2>: exec_prefix.
* Example session <3>: Build variables.
* Example session <4>: Makefile extensions.
* Example session <5>: What configure really does.
* Example session <6>: Sites.
* Example session: Invoking configure.
* For each invocation: Declarations.
* Host: Host.
* Host-specific instructions: per-host.
* Hosts and targets: Hosts and targets.
* includedir: Makefile extensions.
* info: Makefile extensions.
* infodir: Makefile extensions.
* install: Makefile extensions.
* Install details: Install details.
* Install locations: Install locations.
* install-info: Makefile extensions.
* Installation subdirectories: Install details.
* Installing host-independent files: exec_prefix.
* Introduction: What configure does.
* Invoking configure: Invoking configure.
* Local conventions: Makefile fragments.
* Makefile: Makefile extensions.
* mandir: Makefile extensions.
* Minimal configure.in example: Minimal.
* Object directories: Build directories.
* Other files: What configure really does.
* Overview: What configure does.
* Porting with configure: Porting.
* Post-target shell-script fragment: post-target.
* Recursion: What configure does.
* Sample configure.in: Example.
* Sharing host-independent files: exec_prefix.
* Sites: Sites.
* Subdirectories: Install details.
* Symbolic links <1>: What configure does.
* Symbolic links: configure variables.
* Target: Target.
* target shell-script fragment: per-target.
* Target-specific instructions: per-target.
* The exec_prefix directory: exec_prefix.
* Truncating option names: Invoking configure.
* Usage: Invoking configure.
* Usage: detailed: Using configure.
* Using configure: Using configure.
* Variables: Build variables.
* Verbose Output: Invoking configure.
* version: Invoking configure.
* What configure does: What configure does.
* What configure really does: What configure really does.
* Where to install: Install locations.