diff --git a/tess-two/jni/libpng/configure.ac b/tess-two/jni/libpng/configure.ac index a1ec12909..b06f0033c 100644 --- a/tess-two/jni/libpng/configure.ac +++ b/tess-two/jni/libpng/configure.ac @@ -283,17 +283,21 @@ AC_ARG_ENABLE([arm-neon], [case "$enableval" in no|off) # disable the default enabling on __ARM_NEON__ systems: + AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support]) AC_DEFINE([PNG_ARM_NEON_OPT], [0], [Disable ARM Neon optimizations]) # Prevent inclusion of the assembler files below: enable_arm_neon=no;; check) + AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support]) AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [], [Check for ARM Neon support at run-time]);; api) + AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support]) AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [], [Turn on ARM Neon optimizations at run-time]);; yes|on) + AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support]) AC_DEFINE([PNG_ARM_NEON_OPT], [2], [Enable ARM Neon optimizations]) AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if] diff --git a/tess-two/jni/libpng/pngpriv.h b/tess-two/jni/libpng/pngpriv.h index 96b0ca1fb..d3cd76161 100644 --- a/tess-two/jni/libpng/pngpriv.h +++ b/tess-two/jni/libpng/pngpriv.h @@ -123,7 +123,7 @@ * Note that gcc-4.9 defines __ARM_NEON instead of __ARM_NEON__, so we * check both variants. */ -# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \ +# if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \ defined(PNG_ALIGNED_MEMORY_SUPPORTED) # define PNG_ARM_NEON_OPT 2 # else