On Mon, 2011-12-05 at 11:17 -0600, Pierre-Louis Bossart wrote: > I have an optimized SSE-based resampling library that I bolted in > PulseAudio. It was measured to bring a 2x speed-up over speex, mainly > because it uses fixed-tables instead of interpolations, the price being that > it can only be used for fixed-rate sinks/sources. > Since it's hardware-specific, I'd need a means to enable/disable it at > compile time, using some kind of voodoo magic in configure.ac. Does anyone > have pointers on SSE detection logic? To make things safe, I also detect SSE > at run time but would like to disable it completely for other non-x86 or > older platforms. The run-time detection is already available in the pa_cpu_info structure in pa_core. At compile-time, you could follow something similar to what we've done for some ARM instructions in configure.ac for the ssat and pkhbt instructions -- just a small assembly fragment in a C program that can be run through the compiler to make sure the assembler accepts it. Cheers, Arun