Commit 87ffb144 authored by Sam Lantinga's avatar Sam Lantinga

Debian patch: 050_altivec_detection.diff

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%404017
parent 2fd226c2
...@@ -810,16 +810,13 @@ CheckAltivec() ...@@ -810,16 +810,13 @@ CheckAltivec()
AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[default=yes]]]), AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[default=yes]]]),
, enable_altivec=yes) , enable_altivec=yes)
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then
have_altivec_h_hdr=no
AC_CHECK_HEADER(altivec.h, have_altivec_h_hdr=yes)
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
have_gcc_altivec=no have_gcc_altivec=no
AC_MSG_CHECKING(for Altivec with GCC -maltivec option) have_altivec_h_hdr=no
altivec_CFLAGS="-maltivec" altivec_CFLAGS="-maltivec"
CFLAGS="$save_CFLAGS $altivec_CFLAGS" CFLAGS="$save_CFLAGS $altivec_CFLAGS"
if test x$have_altivec_h_hdr = xyes; then AC_MSG_CHECKING(for Altivec with GCC altivec.h and -maltivec option)
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <altivec.h> #include <altivec.h>
vector unsigned int vzero() { vector unsigned int vzero() {
...@@ -828,9 +825,12 @@ AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[defau ...@@ -828,9 +825,12 @@ AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[defau
],[ ],[
],[ ],[
have_gcc_altivec=yes have_gcc_altivec=yes
have_altivec_h_hdr=yes
]) ])
AC_MSG_RESULT($have_gcc_altivec) AC_MSG_RESULT($have_gcc_altivec)
else
if test x$have_gcc_altivec = xno; then
AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
AC_TRY_COMPILE([ AC_TRY_COMPILE([
vector unsigned int vzero() { vector unsigned int vzero() {
return vec_splat_u32(0); return vec_splat_u32(0);
...@@ -843,10 +843,9 @@ AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[defau ...@@ -843,10 +843,9 @@ AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[defau
fi fi
if test x$have_gcc_altivec = xno; then if test x$have_gcc_altivec = xno; then
AC_MSG_CHECKING(for Altivec with GCC -faltivec option) AC_MSG_CHECKING(for Altivec with GCC altivec.h and -faltivec option)
altivec_CFLAGS="-faltivec" altivec_CFLAGS="-faltivec"
CFLAGS="$save_CFLAGS $altivec_CFLAGS" CFLAGS="$save_CFLAGS $altivec_CFLAGS"
if test x$have_altivec_h_hdr = xyes; then
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <altivec.h> #include <altivec.h>
vector unsigned int vzero() { vector unsigned int vzero() {
...@@ -855,9 +854,13 @@ AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[defau ...@@ -855,9 +854,13 @@ AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[defau
],[ ],[
],[ ],[
have_gcc_altivec=yes have_gcc_altivec=yes
have_altivec_h_hdr=yes
]) ])
AC_MSG_RESULT($have_gcc_altivec) AC_MSG_RESULT($have_gcc_altivec)
else fi
if test x$have_gcc_altivec = xno; then
AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
AC_TRY_COMPILE([ AC_TRY_COMPILE([
vector unsigned int vzero() { vector unsigned int vzero() {
return vec_splat_u32(0); return vec_splat_u32(0);
...@@ -868,7 +871,6 @@ AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[defau ...@@ -868,7 +871,6 @@ AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[defau
]) ])
AC_MSG_RESULT($have_gcc_altivec) AC_MSG_RESULT($have_gcc_altivec)
fi fi
fi
CFLAGS="$save_CFLAGS" CFLAGS="$save_CFLAGS"
if test x$have_gcc_altivec = xyes; then if test x$have_gcc_altivec = xyes; then
......
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