From: Brian P. <br...@va...> - 2001-06-06 18:15:42
|
"Marcelo E. Magallon" wrote: > > >> "Sven M. Hallberg" <pe...@gm...> writes: > > > As far as autoconf is concerned, a simple test case will find out > > whether fpstate.magic is defined. The code would use an #ifdef. The > > usual way, really. > > Yes, the problem is doing this with Imakefiles. You depend on whatever > the > > I have looked a bit more into this... > > The solution Brian is looking for looks like: > > #include <signal.h> > /* ... */ > #if defined(USE_KATMAI_ASM) && defined(X86_FXSR_MAGIC) > /* ... */ > #endif > > this compiles the SSE support only if the glibc kernel headers are 2.4 > headers (or patched 2.2 ones). I don't like it, it's ugly. I've committed this solution (basically). I don't think it's ugly. > The proper solution is teaching config/imake/imake.c about > DefaultHasKatmaiSupport. Include signal.h and define this as YES if > X86_FXSR_MAGIC is defined, and NO in other case. Massage other files > to use this. Of course this doesn't solve the case where the user > intentionally sets HasKatmaiSupport to YES but doesn't have the correct > headers. With the imake system you can't solve that. > > This is Linux specific, I have no idea how to handle this in other X86 > OS. Anyone with a clue? I think simply patching the source file with the test for X86_FXSR_MAGIC is sufficient. -Brian |