[Flac-dev] detecting host machine in configure.in?

Matt Zimmerman mdz at debian.org
Wed May 23 14:59:51 PDT 2001


On Tue, May 22, 2001 at 10:52:59PM -0400, Matt Zimmerman wrote:

> The best way to do this is to let autoconf work its magic for you.  Use
> AC_CANONICAL_TARGET in configure.in, and it will place canonical system type
> for the target in the shell variable 'target' in the form
> CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM.  Be sure to use the target,
> not the host, to allow cross-compiling.  It will also be broken out into
> target_cpu, target_vendor and target_os.  So you can use $target_cpu for your
> tests.  A simple:

I seem to have been confused here...what you want is actually
AC_CANONICAL_HOST, and the host_* variables.  I have seen programs use target_*
for this purpose, but now that I look at the definitions in the autoconf
documentation, they appear to be doing the wrong thing:

`--build=BUILD-TYPE'
     the type of system on which the package is being configured and
     compiled.

`--host=HOST-TYPE'
     the type of system on which the package will run.

`--target=TARGET-TYPE'
     the type of system for which any compiler tools in the package will
     produce code (rarely needed).  By default, it is the same as host.

-- 
 - mdz





More information about the Flac-dev mailing list