Like @code{AC_CHECK_PROG}, but first looks for @var{prog-to-check-for}
with a prefix of the host type as specified by @option{--host}, followed by a
dash. For example, if the user runs
-@samp{configure --build=x86_64-gnu --host=i386-gnu}, then this call:
+@samp{configure --build=x86_64-gnu --host=aarch64-linux-gnu}, then this call:
@example
AC_CHECK_TOOL([RANLIB], [ranlib], [:])
@end example
@noindent
-sets @code{RANLIB} to @file{i386-gnu-ranlib} if that program exists in
+sets @code{RANLIB} to @file{aarch64-linux-gnu-ranlib} if that program exists in
@var{path}, or otherwise to @samp{ranlib} if that program exists in
@var{path}, or to @samp{:} if neither program exists.
@option{--build}, not @option{--host}, since the latter enables
cross-compilation. For historical reasons,
whenever you specify @option{--host},
-be sure to specify @option{--build} too; this will be fixed in the
+be sure to specify @option{--build} too; this glitch should be fixed in the
future. So, to enter cross-compilation mode, use a command like this
@example
-./configure --build=i686-pc-linux-gnu --host=m68k-coff
+./configure --build=x86_64-pc-linux-gnu --host=x86_64-w64-mingw64
@end example
@noindent
example, configuring as follows fails:
@example
-./configure CC=m68k-coff-gcc
+./configure CC=x86_64-w64-mingw64-gcc
@end example
When cross-compiling, @command{configure} will warn about any tools
Continuing the example above, if a cross-compiler named @command{cc} is
used with a native @command{pkg-config}, then libraries found by
@command{pkg-config} will likely cause subtle build failures; but using
-the names @command{m68k-coff-cc} and @command{m68k-coff-pkg-config}
+the names @command{x86_64-w64-mingw64-gcc} and
+@command{x86_64-w64-mingw64-pkg-config}
avoids any confusion. Avoiding the warning is as simple as creating the
correct symlinks naming the cross tools.
These transformations are useful with programs that can be part of a
cross-compilation development environment. For example, a
-cross-assembler running on a Sun 4 configured with
-@option{--target=i960-vxworks} is normally installed as
-@file{i960-vxworks-as}, rather than @file{as}, which could be confused
-with a native Sun 4 assembler.
+cross-assembler running on x86-64 configured with
+@option{--target=aarch64-linux-gnu} is normally installed as
+@file{aarch64-linux-gnu-as}, rather than @file{as}, which could be confused
+with a native x86-64 assembler.
You can force a program name to begin with @file{g}, if you don't want
GNU programs installed on your system to shadow other programs with
@option{--build} too.
@example
-./configure --build=i686-pc-linux-gnu --host=m68k-coff
+./configure --build=x86_64-pc-linux-gnu --host=x86_64-w64-mingw64
@end example
@noindent
configure as follows:
@example
-./configure CC=m68k-coff-gcc
+./configure CC=x86_64-w64-mingw64-gcc
@end example