[speex-dev] libspeex/SSE Intrinsics with GCC 3.3.x

Aron Rosenberg aron at sightspeed.com
Thu Apr 1 22:11:00 PST 2004

So, if you want to enable that within the --enable-sse you would modify the 
exisiting the AC_ARG_ENABLE macro for sse to include that chunk. You can 
drop the -O3 if you want, its not needed for sse support on gcc. As for 
which -O would be used, its the last one specified (from gcc man page). You 
can get really fancy with a test program that compiles a little bit of code 
and makes sure it works, but that would require more autoconf hacking than 
i can write in a few minutes.

     [  --enable-sse             enable SSE support],

<p>Another note i forgot: If you want to do the system detection, you need to add


as the first major line, right after the


and remove the AC_CANONICAL_HOST line

Aron Rosenberg

<p>At 09:53 PM 4/1/2004, you wrote:
>Actually, I prefer having the user explicitly specify --enable-sse
>because you might want to compile for other machines than what you have.
>Also, any idea what happens if the user already has CFLAGS=-O2 defined
>(and you add -O3)? Last thing, how do you check whether gcc accepts
>         Jean-Marc
>Le ven 02/04/2004 à 00:40, Aron Rosenberg a écrit :
> > Here is code to add to configure.in to do what you want. It preserves
> > CFLAGS and uses that var to hold the sse enable flags. You can subset this
> > under the exisiting AC_ARG for sse or just make it do it all the time. If
> > you notice the i?86, that means any x86 platform target will have it
> > enabled. You can change that i686, but keep in mind that some distros
> > compile/target for i386 on the glibc / gcc compiles and you will sometimes
> > get i386 as the target even though you are on a pentium 3/4 box.
> >
> > Aron Rosenberg
> > SightSpeed
> >
> > +++++ Add to configure.in ++++++++
> >
> > echo -n "Checking for Platform ASM Speedups..."
> > case "$target" in
> >      i?86*)
> >          CFLAGS="$CFLAGS -D_USE_SSE -O3 -msse"
> >          echo "Found and Activating SSE"
> >          ;;
> >      powerpc-apple-darwin*)
> >          CFLAGS="-faltivec"
> >          echo "Found and Activating Altivec"
> >          ;;
> >      *)
> >          echo "None Found"
> >          ;;
> > esac
>Jean-Marc Valin
>Université de Sherbrooke, Québec, Canada

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Speex-dev mailing list