Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas


Modified Files:
        acconfig.h configure.in 


Log Message:
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.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/acconfig.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- acconfig.h  10 Dec 2003 01:12:12 -0000      1.8
+++ acconfig.h  16 Dec 2003 01:58:17 -0000      1.9
@@ -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
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/configure.in,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- configure.in        10 Dec 2003 01:12:12 -0000      1.63
+++ configure.in        16 Dec 2003 01:58:17 -0000      1.64
@@ -395,6 +395,48 @@
   ], 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, 
@@ -793,6 +835,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




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to