[libpng17] Fixed ALIGNED_MEMORY support and

Allow run-time ARM NEON checking to be disabled. A new configure option:
--enable-arm-neon=always will stop the run-time checks. New checks
within arm/arm_init.c will cause the code not to be compiled unless
__ARM_NEON__ is set. This should make it fail safe (if someone asks
for it on then the build will fail if it can't be done.)
This commit is contained in:
John Bowler
2013-02-19 09:52:30 -06:00
committed by Glenn Randers-Pehrson
parent 7363babe4f
commit 2799f74489
6 changed files with 48 additions and 20 deletions

View File

@@ -340,15 +340,20 @@ AM_CONDITIONAL([DO_PNG_PREFIX], [test "${with_libpng_prefix:-no}" != "no"])
AC_SUBST([AM_CCASFLAGS], [-Wa,--noexecstack])
AC_ARG_ENABLE([arm-neon],
AS_HELP_STRING([[[--enable-arm-neon]]], [Enable ARM NEON optimizations]),
[if test "${enableval}" = "yes"; then
AS_HELP_STRING([[[--enable-arm-neon]]],
[Enable ARM NEON optimizations: use 'always' to turn off run-time checks]),
[if test "${enableval}" = "yes" -o "${enableval}" = "always"; then
AC_DEFINE([PNG_FILTER_OPTIMIZATIONS],
[png_init_filter_functions_neon],
[ARM NEON filter initialization function])
AC_DEFINE([PNG_ALIGNED_MEMORY_SUPPORTED], [1],
AC_DEFINE([PNG_ALIGNED_MEMORY_SUPPORTED], [],
[Align row buffers])
if test "${enableval}" = "always"; then
AC_DEFINE([PNG_NO_ARM_NEON_CHECK], [],
[Turn off run-time checking for ARM NEON support])
fi
fi])
AM_CONDITIONAL([PNG_ARM_NEON], [test "${enable_arm_neon:-no}" = yes])
AM_CONDITIONAL([PNG_ARM_NEON], [test "${enable_arm_neon:-no}" != "no"])
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])