ok - i think this can double-check if neon code can be compiled at all.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Jul 2010 04:52:45 +0000 (04:52 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Jul 2010 04:52:45 +0000 (04:52 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@49960 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac

index 21c4fbe..53b2caa 100644 (file)
@@ -1021,25 +1021,40 @@ case $host_cpu in
 esac
 AC_MSG_CHECKING(whether to build neon code)
 AC_ARG_ENABLE(cpu-neon,
-  AC_HELP_STRING([--enable-cpu-neon], [enable neon code]),
+  AC_HELP_STRING([--enable-cpu-neon], [enable neon code - with gcc you will need these CFLAGS for it to begin to work, and even then your gcc may have broken or non-existant support: -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon]),
   [
-      if test "x$enableval" = "xyes" ; then
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(BUILD_NEON, 1, [Build NEON Code])
-        build_cpu_neon="yes"
+     if test "x$enableval" = "xyes" ; then
+       AC_TRY_COMPILE([arm_neon.h],
+        [asm volatile ("vqadd.u8 d0, d1, d0\n");],
+        [
+          AC_MSG_RESULT(yes)
+          AC_DEFINE(BUILD_NEON, 1, [Build NEON Code])
+          build_cpu_neon="yes"
+        ],[
+          AC_MSG_RESULT(no)
+          build_cpu_neon="no"
+        ])
       else
         AC_MSG_RESULT(no)
         build_cpu_neon="no"
       fi
   ],
   [
-    AC_MSG_RESULT($build_cpu_neon)
     if test "x$build_cpu_neon" = "xyes" ; then
-      AC_DEFINE(BUILD_NEON, 1, [Build NEON Code])
+       AC_TRY_COMPILE([arm_neon.h],
+        [asm volatile ("vqadd.u8 d0, d1, d0\n");],
+        [
+          AC_MSG_RESULT(yes)
+          AC_DEFINE(BUILD_NEON, 1, [Build NEON Code])
+          build_cpu_neon="yes"
+        ],[
+          AC_MSG_RESULT(no)
+          build_cpu_neon="no"
+        ])
     fi
   ]
 )
-
+     
 #######################################
 ## C
 build_cpu_c="yes"