15bec5421Sopenharmony_cidiff --git a/configure.ac b/configure.ac
25bec5421Sopenharmony_ciindex 4fb0778..930bf50 100644
35bec5421Sopenharmony_ci--- a/configure.ac
45bec5421Sopenharmony_ci+++ b/configure.ac
55bec5421Sopenharmony_ci@@ -283,17 +283,21 @@ AC_ARG_ENABLE([arm-neon],
65bec5421Sopenharmony_ci    [case "$enableval" in
75bec5421Sopenharmony_ci       no|off)
85bec5421Sopenharmony_ci          # disable the default enabling on __ARM_NEON__ systems:
95bec5421Sopenharmony_ci+         AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
105bec5421Sopenharmony_ci          AC_DEFINE([PNG_ARM_NEON_OPT], [0],
115bec5421Sopenharmony_ci                    [Disable ARM Neon optimizations])
125bec5421Sopenharmony_ci          # Prevent inclusion of the assembler files below:
135bec5421Sopenharmony_ci          enable_arm_neon=no ;;
145bec5421Sopenharmony_ci       check)
155bec5421Sopenharmony_ci+         AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
165bec5421Sopenharmony_ci          AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
175bec5421Sopenharmony_ci                    [Check for ARM Neon support at run-time]);;
185bec5421Sopenharmony_ci       api)
195bec5421Sopenharmony_ci+         AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
205bec5421Sopenharmony_ci          AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [],
215bec5421Sopenharmony_ci                    [Turn on ARM Neon optimizations at run-time]);;
225bec5421Sopenharmony_ci       yes|on)
235bec5421Sopenharmony_ci+         AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
245bec5421Sopenharmony_ci          AC_DEFINE([PNG_ARM_NEON_OPT], [2],
255bec5421Sopenharmony_ci                    [Enable ARM Neon optimizations])
265bec5421Sopenharmony_ci          AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
275bec5421Sopenharmony_cidiff --git a/pngpriv.h b/pngpriv.h
285bec5421Sopenharmony_ciindex 1997503..789206f 100644
295bec5421Sopenharmony_ci--- a/pngpriv.h
305bec5421Sopenharmony_ci+++ b/pngpriv.h
315bec5421Sopenharmony_ci@@ -125,7 +125,7 @@
325bec5421Sopenharmony_ci     * associated assembler code, pass --enable-arm-neon=no to configure
335bec5421Sopenharmony_ci     * or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS.
345bec5421Sopenharmony_ci     */
355bec5421Sopenharmony_ci-#  if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
365bec5421Sopenharmony_ci+#  if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
375bec5421Sopenharmony_ci    defined(PNG_ALIGNED_MEMORY_SUPPORTED)
385bec5421Sopenharmony_ci #     define PNG_ARM_NEON_OPT 2
395bec5421Sopenharmony_ci #  else
40