[libpng16] Make ARM NEON support work at compile time (not just configure time).
This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
using a compiler that compiles for multiple architectures at one time.
diff --git a/ANNOUNCE b/ANNOUNCE
index 795045b..622114f 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -83,6 +83,9 @@
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
Enclose the prototypes for the simplified write API in
#ifdef PNG_STDIO_SUPPORTED/#endif
+ Make ARM NEON support work at compile time (not just configure time).
+ This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
+ using a compiler that compiles for multiple architectures at one time.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index 2add01c..738cc8b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4567,6 +4567,9 @@
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
Enclose the prototypes for the simplified write API in
#ifdef PNG_STDIO_SUPPORTED/#endif
+ Make ARM NEON support work at compile time (not just configure time).
+ This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
+ using a compiler that compiles for multiple architectures at one time.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/configure.ac b/configure.ac
index 86c9b88..4bf8eff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,11 +239,12 @@
[Enable ARM NEON optimizations: =no/off, check, api, yes/on:]
[no/off: disable the optimizations; check: use internal checking code]
[(deprecated and poorly supported); api: disable by default, enable by]
- [a call to png_set_option; yes/on: turn on unconditionally.]),
+ [a call to png_set_option; yes/on: turn on unconditionally.]
+ [If not specified: determined by the compiler.]),
[case "$enableval" in
no|off)
# disable the default enabling on __ARM_NEON__ systems:
- AC_DEFINE([PNG_NO_ARM_NEON], [],
+ AC_DEFINE([PNG_ARM_NEON_NOT_SUPPORTED], [],
[Disable ARM Neon optimizations])
# Prevent inclusion of the assembler files below:
enable_arm_neon=no;;
diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa
index aed4761..ff00b45 100755
--- a/scripts/pnglibconf.dfa
+++ b/scripts/pnglibconf.dfa
@@ -158,12 +158,6 @@
@# endif
@#endif
-# This changes the default for the ARM NEON optimizations according to
-# __ARM_NEON__
-@#ifdef __ARM_NEON__
-@# define PNG_ARM_NEON_SUPPORTED
-@#endif
-
# IN DEVELOPMENT
# These are currently experimental features; define them if you want (NOTE:
# experimental options must be disabled before they are defined in this file!)
@@ -213,12 +207,15 @@
# These options are specific to the ARM NEON hardware optimizations:
#
# ARM_NEON: the optimization itself
+# ARM_NEON_NOT: disable the optimization even on systems that apparently support
+# it (where the compiler defines __ARM_NEON__).
# ARM_NEON_API: allow the optimization to be switched on with png_set_hardware
# ARM_NEON_CHECK: compile a run-time check to see if Neon extensions are
# supported, this is poorly supported and deprectated - use the
# png_set_hardware API.
option ARM_NEON disabled,
sets FILTER_OPTIMIZATIONS png_init_filter_functions_neon
+option ARM_NEON_NOT disabled
option ARM_NEON_API disabled enables SET_OPTION ARM_NEON
option ARM_NEON_CHECK disabled enables ARM_NEON