1diff --git a/configure.ac b/configure.ac 2index 4fb0778..930bf50 100644 3--- a/configure.ac 4+++ b/configure.ac 5@@ -393,17 +393,21 @@ AC_ARG_ENABLE([arm-neon], 6 [case "$enableval" in 7 no|off) 8 # disable the default enabling on __ARM_NEON__ systems: 9+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support]) 10 AC_DEFINE([PNG_ARM_NEON_OPT], [0], 11 [Disable ARM Neon optimizations]) 12 # Prevent inclusion of the assembler files below: 13 enable_arm_neon=no ;; 14 check) 15+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support]) 16 AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [], 17 [Check for ARM Neon support at run-time]);; 18 api) 19+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support]) 20 AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [], 21 [Turn on ARM Neon optimizations at run-time]);; 22 yes|on) 23+ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support]) 24 AC_DEFINE([PNG_ARM_NEON_OPT], [2], 25 [Enable ARM Neon optimizations]) 26 AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';] 27 28diff --git a/pngpriv.h b/pngpriv.h 29index 1997503..789206f 100644 30--- a/pngpriv.h 31+++ b/pngpriv.h 32@@ -127,7 +127,7 @@ 33 * associated assembler code, pass --enable-arm-neon=no to configure 34 * or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS. 35 */ 36-# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \ 37+# if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \ 38 defined(PNG_ALIGNED_MEMORY_SUPPORTED) 39 # define PNG_ARM_NEON_OPT 2 40 # else 41 42 43