forked from enlightenment/efl
Enable the use of altivec functions. A bit of a dirty hack to detect the
compiler settings for detecting altivec support. If someone has a better suggestion, please speak up. SVN revision: 8125
This commit is contained in:
parent
1f175f4660
commit
aad892aa62
|
@ -57,6 +57,7 @@
|
|||
#undef BUILD_SCALE_TRILINEAR
|
||||
#undef BUILD_MMX
|
||||
#undef BUILD_SSE
|
||||
#undef BUILD_ALTIVEC
|
||||
#undef BUILD_C
|
||||
#undef BUILD_LOADER_PNG
|
||||
#undef BUILD_LOADER_JPEG
|
||||
|
|
|
@ -395,6 +395,48 @@ AC_ARG_ENABLE(cpu-sse,
|
|||
], AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
altivec_cflags=""
|
||||
altivec_libs=""
|
||||
|
||||
AC_MSG_CHECKING(whether to build altivec code)
|
||||
|
||||
AC_ARG_ENABLE(cpu-altivec,
|
||||
[ --enable-cpu-altivec enable altivec code], [
|
||||
if [ test "$enableval" = "yes" ]; then
|
||||
have_altivec="yes"
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
], AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
if test "x$have_altivec" = "xyes"; then
|
||||
AC_CHECK_HEADER(altivec.h,
|
||||
[
|
||||
altivec_libs="-laltivec"
|
||||
AC_DEFINE(BUILD_ALTIVEC)
|
||||
],
|
||||
[
|
||||
have_altivec=""
|
||||
])
|
||||
fi
|
||||
|
||||
if test "x$have_altivec" = "x"; then
|
||||
AC_MSG_CHECKING(whether to use altivec compiler flag)
|
||||
if test $GCC = yes; then
|
||||
if echo "int main(){ return 0;}" | gcc -faltivec -E - > /dev/null 2>&1; then
|
||||
AC_MSG_RESULT(yes)
|
||||
altivec_cflags="-faltivec"
|
||||
AC_DEFINE(BUILD_ALTIVEC)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether to build c code)
|
||||
|
||||
AC_ARG_ENABLE(cpu-c,
|
||||
|
@ -794,6 +836,8 @@ AC_SUBST(ENGINE_BUFFER_PRG)
|
|||
AC_SUBST(ENGINE_SOFTWARE_QTOPIA_PRG)
|
||||
AC_SUBST(ENGINE_GL_X11_PRG)
|
||||
|
||||
AC_SUBST(altivec_cflags)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
|
|
Loading…
Reference in New Issue