119ea1
diff --git a/configure.ac b/configure.ac
119ea1
index 4fb0778..930bf50 100644
119ea1
--- a/configure.ac
119ea1
+++ b/configure.ac
119ea1
@@ -283,17 +283,21 @@ AC_ARG_ENABLE([arm-neon],
119ea1
    [case "$enableval" in
119ea1
       no|off)
119ea1
          # disable the default enabling on __ARM_NEON__ systems:
119ea1
+         AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
119ea1
          AC_DEFINE([PNG_ARM_NEON_OPT], [0],
119ea1
                    [Disable ARM Neon optimizations])
119ea1
          # Prevent inclusion of the assembler files below:
119ea1
          enable_arm_neon=no;;
119ea1
       check)
119ea1
+         AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
119ea1
          AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
119ea1
                    [Check for ARM Neon support at run-time]);;
119ea1
       api)
119ea1
+         AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
119ea1
          AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [],
119ea1
                    [Turn on ARM Neon optimizations at run-time]);;
119ea1
       yes|on)
119ea1
+         AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
119ea1
          AC_DEFINE([PNG_ARM_NEON_OPT], [2],
119ea1
                    [Enable ARM Neon optimizations])
119ea1
          AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
119ea1
diff --git a/pngpriv.h b/pngpriv.h
119ea1
index 1997503..789206f 100644
119ea1
--- a/pngpriv.h
119ea1
+++ b/pngpriv.h
119ea1
@@ -125,7 +125,7 @@
119ea1
     * associated assembler code, pass --enable-arm-neon=no to configure
119ea1
     * or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS.
119ea1
     */
119ea1
-#  if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
119ea1
+#  if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
119ea1
    defined(PNG_ALIGNED_MEMORY_SUPPORTED)
119ea1
 #     define PNG_ARM_NEON_OPT 2
119ea1
 #  else