| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
How do you use a canonical system type? Usually, you use it in one or
more case statements in `configure.ac' to select
system-specific C files. Then, using AC_CONFIG_LINKS, link those
files which have names based on the system name, to generic names, such
as `host.h' or `target.c' (see section 4.10 Creating Configuration Links). The
case statement patterns can use shell wild cards to group several
cases together, like in this fragment:
case "$target" in
i386-*-mach* | i386-*-gnu*)
obj_format=aout emulation=mach bfd_gas=yes ;;
i960-*-bout) obj_format=bout ;;
esac
|
and in `configure.ac', use:
AC_CONFIG_LINKS(host.h:config/$machine.h
object.h:config/$obj_format.h)
|
You can also use the host system type to find cross-compilation tools.
See section 5.2.2 Generic Program and File Checks, for information about the AC_CHECK_TOOL
macro which does that.