• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/configure.ac b/configure.ac
2index 4fb0778..930bf50 100644
3--- a/configure.ac
4+++ b/configure.ac
5@@ -283,17 +283,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', if]
27diff --git a/pngpriv.h b/pngpriv.h
28index 1997503..789206f 100644
29--- a/pngpriv.h
30+++ b/pngpriv.h
31@@ -125,7 +125,7 @@
32     * associated assembler code, pass --enable-arm-neon=no to configure
33     * or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS.
34     */
35-#  if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
36+#  if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
37    defined(PNG_ALIGNED_MEMORY_SUPPORTED)
38 #     define PNG_ARM_NEON_OPT 2
39 #  else
40