GNU Info

Info Node: (autoconf.info)Using System Type

(autoconf.info)Using System Type


Prev: System Type Variables Up: Manual Configuration
Enter node , (file) or (file)node

Using the System Type
=====================

   How do you use a canonical system type?  Usually, you use it in one
or more `case' statements in `configure.in' to select system-specific C
files.  Then link those files, which have names based on the system
name, to generic names, such as `host.h' or `target.c'.  The `case'
statement patterns can use shell wildcards 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

 - Macro: AC_LINK_FILES (SOURCE..., DEST...)
     Make `AC_OUTPUT' link each of the existing files SOURCE to the
     corresponding link name DEST.  Makes a symbolic link if possible,
     otherwise a hard link.  The DEST and SOURCE names should be
     relative to the top level source or build directory.  This macro
     may be called multiple times.

     For example, this call:

          AC_LINK_FILES(config/${machine}.h config/${obj_format}.h, host.h object.h)

     creates in the current directory `host.h', which is a link to
     `SRCDIR/config/${machine}.h', and `object.h', which is a link to
     `SRCDIR/config/${obj_format}.h'.

   You can also use the host system type to find cross-compilation
tools.  Note: Generic Programs, for information about the
`AC_CHECK_TOOL' macro which does that.


automatically generated by info2www version 1.2.2.9