mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Corrected Android builds and corrected libpng.vers with symbol
prefixing This adds an API to set optimization options externally,
providing an alternative and general solution for the non-portable
run-time tests used by the ARM Neon code. It also makes those tests
compile and link on Android.
The order of settings vs options in pnglibconf.h is reversed to allow
settings to depend on options and options can now set (or override) the
defaults for settings.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
e15b537825
commit
f3728100d9
33
configure.ac
33
configure.ac
@@ -233,18 +233,27 @@ AC_SUBST([AM_CCASFLAGS], [-Wa,--noexecstack])
|
||||
|
||||
AC_ARG_ENABLE([arm-neon],
|
||||
AS_HELP_STRING([[[--enable-arm-neon]]],
|
||||
[Enable ARM NEON optimizations: use 'always' to turn off run-time checks]),
|
||||
[if test "${enableval}" = "yes" -o "${enableval}" = "always"; then
|
||||
AC_DEFINE([PNG_FILTER_OPTIMIZATIONS],
|
||||
[png_init_filter_functions_neon],
|
||||
[ARM NEON filter initialization function])
|
||||
AC_DEFINE([PNG_ALIGNED_MEMORY_SUPPORTED], [],
|
||||
[Align row buffers])
|
||||
if test "${enableval}" = "always"; then
|
||||
AC_DEFINE([PNG_NO_ARM_NEON_CHECK], [],
|
||||
[Turn off run-time checking for ARM NEON support])
|
||||
fi
|
||||
fi])
|
||||
[Enable ARM NEON optimizations: =off, check, api, on:]
|
||||
[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; on: turn on unconditionally. The]
|
||||
[default is 'on' if __ARM_NEON__ is defined, otherwise 'off'.]),
|
||||
[case "$enableval" in
|
||||
off)
|
||||
AC_DEFINE([PNG_NO_ARM_NEON], [],
|
||||
[Disable ARM Neon optimizations]);;
|
||||
check)
|
||||
AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
|
||||
[Check for ARM Neon support at run-time]);;
|
||||
api)
|
||||
AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [],
|
||||
[Turn on ARM Neon optimizations at run-time]);;
|
||||
on)
|
||||
AC_DEFINE([PNG_ARM_NEON_SUPPORTED], [],
|
||||
[Enable ARM Neon optimizations]);;
|
||||
*)
|
||||
AC_MSG_ERROR([arm-neon: option value required (off/check/api/on)]);;
|
||||
esac])
|
||||
AM_CONDITIONAL([PNG_ARM_NEON], [test "${enable_arm_neon:-no}" != "no"])
|
||||
|
||||
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
|
||||
|
||||
Reference in New Issue
Block a user