From: raster Date: Thu, 1 Jul 2010 04:52:45 +0000 (+0000) Subject: ok - i think this can double-check if neon code can be compiled at all. X-Git-Tag: submit/trunk/20120815.174732~2672 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e2b285b275adc2cf71264ccc4ba0614f83f23ba;p=profile%2Fivi%2Fevas.git ok - i think this can double-check if neon code can be compiled at all. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@49960 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/configure.ac b/configure.ac index 21c4fbe..53b2caa 100644 --- a/configure.ac +++ b/configure.ac @@ -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"