GNU Autoconf, Automake, and Libtool
by Gary V. Vaughan, Ben Elliston, Tom Tromey, Ian Lance Taylor
25.3. Using the Target Type
A 'configure' script for a cross-compilation tool uses the '--target' option to control how it is built, so that the resulting program will produce programs that run on the appropriate system. This section explains how you can write your own configure scripts to support the '--target' option.
You must start by putting 'AC_CANONICAL_SYSTEM' in 'configure.in'. 'AC_CANONICAL_SYSTEM' looks for a '--target' option and canonicalizes it using the 'config.sub' shell script. (For more information about configuration names, canonicalizing them, and 'config.sub', see Section 2.4, "Configuration Names." ) 'AC_CANONICAL_SYSTEM' also runs 'AC_CANONICAL_HOST' to get the host information.
The host and target type are recorded in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access