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

Christian Weisgerber naddy at mips.inka.de
Wed May 23 04:36:04 PDT 2001


Josh Coalson <xflac at yahoo.com> wrote:

> Basically what I want is configure.in determination of
> basic machine type (intel/compatible, alpha, ppc), then within
> that (say intel) the code will detect variants like MMX, SSE,
> and use the right routines.

Please include a way to disable processor-specific optimizations.
Some people need to be able to build (for example) generic i386
packages, no matter whether the build machine happens to support
SSE etc.

> I know how to do the second, but what is a good way to do the first?

Follow Matt's suggestion.  Note that target_cpu = i386 doesn't
(portably) imply an actual i386 but rather an x86-family processor.

> Is uname -m or uname -p more reliable?

You don't want to have to deal with those.  Their output can vary
widely on different platforms, e.g.:

Solaris:
  -m  sun4m
  -p  sparc
OpenBSD:
  -m  sparc
  -p  SUNW,SPARCstation-20, TMS390Z50 v0 or TMS390Z55 @ 75 MHz, on-chip FPU

-- 
Christian "naddy" Weisgerber                          naddy at mips.inka.de




More information about the Flac-dev mailing list