[Flac-dev] last minute changes

Josh Coalson xflac at yahoo.com
Wed Nov 14 09:42:04 PST 2001


--- Asheesh Laroia <paulproteus at technologist.com> wrote:
> Can't you write a script for ./configure that checks for this, rather
> than
> having the library do the check each time it's used?  If not, perhaps
> check /proc/cpuinfo or something.  The DoIHaveSSE and DoIHave3DNow
> checks
> could fork() if the system provides fork(); if not, the checks would
> return false.
> 
> Couldn't you also just check for fork() in the configure script?

cpu support for 3dnow and sse can be easily detected at
runtime.  I turned off 3dnow by default because it is
implicated in some crashes.

sse also requires operating system support.  thanks to
intel's brilliant design, the only real way to do this
at flac runtime is for the library to fork() itself,
run some sse instructions in the new process, and watch
if it crashes.  quietly forking in a library is bad
since some library users may not want to fork (like
if their process image is huge) for such a simple
thing.

you could detect at configure time, but that makes the
resulting binary OK for the build machine but not for
others.  that's why I make it explicit with --sse-os.

Josh


__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com




More information about the Flac-dev mailing list