Go to the first, previous, next, last section, table of contents.
Like other GNU configure
scripts, Autoconf-generated
configure
scripts can make decisions based on a canonical name
for the system type, which has the form:
`cpu-vendor-os', where os can be
`system' or `kernel-system'
configure
can usually guess the canonical name for the type of
system it's running on. To do so it runs a script called
config.guess
, which infers the name using the uname
command or symbols predefined by the C preprocessor.
Alternately, the user can specify the system type with command line
arguments to configure
. Doing so is necessary when
cross-compiling. In the most complex case of cross-compiling, three
system types are involved. The options to specify them are(3):
They all default to the result of running config.guess
, unless
you specify either @option{--build} or @option{--host}. In this case, the
default becomes the system type you specified. If you specify both, and
they're different, configure
will enter cross compilation mode,
so it won't run any tests that require execution.
Hint: if you mean to override the result of config.guess
, prefer
@option{--build} over @option{--host}. In the future, @option{--host} will
not override the name of the build system type. Also, if you specify
@option{--host}, but not @option{--build}, when configure
performs
the first compiler test it will try to run an executable produced by the
compiler. If the execution fails, it will enter cross-compilation mode.
Note, however, that it won't guess the build-system type, since this may
require running test programs. Moreover, by the time the compiler test
is performed, it may be too late to modify the build-system type: other
tests may have already been performed. Therefore, whenever you specify
--host
, be sure to specify --build
too.
./configure --build=i686-pc-linux-gnu --host=m68k-coff
will enter cross-compilation mode, but configure
will fail if it
can't run the code generated by the specified compiler if you configure
as follows:
./configure CC=m68k-coff-gcc
configure
recognizes short aliases for many system types; for
example, `decstation' can be used instead of
`mips-dec-ultrix4.2'. configure
runs a script called
config.sub
to canonicalize system type aliases.
Go to the first, previous, next, last section, table of contents.