diff --git a/ANNOUNCE b/ANNOUNCE index 69c1ff90d..fe8d3c5d7 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.31beta02 - July 6, 2017 +Libpng 1.6.31beta02 - July 8, 2017 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -69,8 +69,10 @@ Version 1.6.31beta01 [July 5, 2017] Added "Requires: zlib" to libpng.pc.in (Pieter Neerincx). Added special case for FreeBSD in arm/filter_neon.S (Maya Rashish). -Version 1.6.31beta02 [July 6, 2017] +Version 1.6.31beta02 [July 8, 2017] Added instructions for disabling hardware optimizations in INSTALL. + Added "--enable-hardware-optimizations" configuration flag to enable + or disable all hardware optimizations with one flag. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 99301a6f5..8ba253f6e 100644 --- a/CHANGES +++ b/CHANGES @@ -5864,8 +5864,10 @@ Version 1.6.31beta01 [July 5, 2017] Added "Requires: zlib" to libpng.pc.in (Pieter Neerincx). Added special case for FreeBSD in arm/filter_neon.S (Maya Rashish). -Version 1.6.31beta02 [July 6, 2017] +Version 1.6.31beta02 [July 8, 2017] Added instructions for disabling hardware optimizations in INSTALL. + Added "--enable-hardware-optimizations" configuration flag to enable + or disable all hardware optimizations with one flag. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/INSTALL b/INSTALL index c527938b6..14497f6d0 100644 --- a/INSTALL +++ b/INSTALL @@ -293,6 +293,10 @@ such as one of --enable-intel-sse=yes --enable-powerpc-vsx=yes +or enable them all at once with + + --enable-hardware-optimizations=yes + or, if you are not using "configure", you can use one of CPPFLAGS += "-DPNG_ARM_NEON" @@ -301,11 +305,15 @@ or, if you are not using "configure", you can use one of CPPFLAGS += "-DPNG_POWERPC_VSX" If you wish to avoid using them, -you can disable them via configure options such as +you can disable them via the configure option - --enable-arm-neon=no, --enable-mips-msa=no, --enable-intel-sse=no, - --enable-powerpc-vsx=no + --disable-hardware-optimizations +to disable them all, or + + --enable-intel-sse=no + +to disable a particular one, or via compiler-command options such as CPPFLAGS += "-DPNG_ARM_NEON_OPT=0, -DPNG_MIPS_MSA_OPT=0, diff --git a/configure.ac b/configure.ac index 9dceaabb6..9024d99c7 100644 --- a/configure.ac +++ b/configure.ac @@ -300,6 +300,54 @@ AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG], # HOST SPECIFIC OPTIONS # ===================== # +# DEFAULT +# ======= +# +AC_ARG_ENABLE([hardware-optimizations], + AS_HELP_STRING([[[--enable-hardware-optimizations]]], + [Enable hardware optimizations: =no/off, yes/on:]), + [case "$enableval" in + no|off) + # disable hardware optimization on all systems: + enable_arm_neon=no + AC_DEFINE([PNG_ARM_NEON_OPT], [0], + [Disable ARM_NEON optimizations]) + enable_mips_msa=no + AC_DEFINE([PNG_MIPS_MSA_OPT], [0], + [Disable MIPS_MSA optimizations]) + enable_powerpc_vsx=no + AC_DEFINE([PNG_POWERPC_VSX_OPT], [0], + [Disable POWERPC VSX optimizations]) + enable_intel_sse=no + AC_DEFINE([PNG_INTEL_SSE_OPT], [0], + [Disable INTEL_SSE optimizations]) + *) + # allow enabling hardware optimization on any system: + case "$host_cpu" in + arm*|aarch64*) + enable_arm_neon=yes + AC_DEFINE([PNG_ARM_NEON_OPT], [0], + [Enable ARM_NEON optimizations]) + ;; + mipsel*|mips64el*) + enable_mips_msa=yes + AC_DEFINE([PNG_MIPS_MSA_OPT], [0], + [Enable MIPS_MSA optimizations]) + ;; + i?86|x86_64) + enable_intel_sse=yes + AC_DEFINE([PNG_INTEL_SSE_OPT], [1], + [Enable Intel SSE optimizations]) + ;; + powerpc*|ppc64*) + enable_powerpc_vsx=yes + AC_DEFINE([PNG_POWERPC_VSX_OPT], [2], + [Enable POWERPC VSX optimizations]) + ;; + esac + ;; + esac]) + # ARM # === #