Commit 47107f28 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Enable altivec blitters on PowerPC Linux, and some fixes for recent

 GCCs versions.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401165
parent dba88d23
...@@ -1910,11 +1910,30 @@ CheckUSBHID() ...@@ -1910,11 +1910,30 @@ CheckUSBHID()
dnl Check for altivec instruction support using gas syntax dnl Check for altivec instruction support using gas syntax
CheckAltivec() CheckAltivec()
{ {
AC_MSG_CHECKING(for GCC Altivec instruction support) dnl FIXME: Theoretically, you might not have altivec.h, we should check
have_gcc_altivec=no dnl FIXME: that seperately, but I think all major platforms have it
dnl FIXME: at the moment... --ryan.
save_CFLAGS="${CFLAGS}" save_CFLAGS="${CFLAGS}"
have_gcc_altivec=no
AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
CFLAGS="${save_CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -maltivec"
AC_TRY_COMPILE([
#include <altivec.h>
vector unsigned int vzero() {
return vec_splat_u32(0);
}
],[
],[
have_gcc_altivec=yes
])
AC_MSG_RESULT($have_gcc_altivec)
if test x$have_gcc_altivec = xno; then
AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
CFLAGS="${CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -faltivec" CFLAGS="${CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -faltivec"
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <altivec.h>
vector unsigned int vzero() { vector unsigned int vzero() {
return vec_splat_u32(0); return vec_splat_u32(0);
} }
...@@ -1922,10 +1941,12 @@ CheckAltivec() ...@@ -1922,10 +1941,12 @@ CheckAltivec()
],[ ],[
have_gcc_altivec=yes have_gcc_altivec=yes
]) ])
AC_MSG_RESULT($have_gcc_altivec)
fi
if test x$have_gcc_altivec = xno; then if test x$have_gcc_altivec = xno; then
CFLAGS="${save_CFLAGS}" CFLAGS="${save_CFLAGS}"
fi fi
AC_MSG_RESULT($have_gcc_altivec)
} }
dnl Check for a valid linux/version.h dnl Check for a valid linux/version.h
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment