mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Moved SSE2 optimization code into the main libpng source directory.
Configure libpng with "configure --enable-intel-see" or compile libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it.
This commit is contained in:
39
configure.ac
39
configure.ac
@@ -1,7 +1,7 @@
|
||||
# configure.ac
|
||||
|
||||
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
||||
# Last changed in libpng 1.6.25 [September 1, 2016]
|
||||
# Copyright (c) 2004-2017 Glenn Randers-Pehrson
|
||||
# Last changed in libpng 1.6.28 [January 5, 2017]
|
||||
|
||||
# This code is released under the libpng license.
|
||||
# For conditions of distribution and use, see the disclaimer
|
||||
@@ -391,6 +391,41 @@ AM_CONDITIONAL([PNG_MIPS_MSA],
|
||||
mipsel*|mips64el*) :;;
|
||||
esac])
|
||||
|
||||
# INTEL
|
||||
# =====
|
||||
#
|
||||
# INTEL SSE (SIMD) support.
|
||||
|
||||
AC_ARG_ENABLE([intel-sse],
|
||||
AS_HELP_STRING([[[--enable-intel-sse]]],
|
||||
[Enable Intel SSE optimizations: =no/off, yes/on:]
|
||||
[no/off: disable the optimizations;]
|
||||
[yes/on: enable the optimizations.]
|
||||
[If not specified: determined by the compiler.]),
|
||||
[case "$enableval" in
|
||||
no|off)
|
||||
# disable the default enabling:
|
||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [0],
|
||||
[Disable Intel SSE optimizations])
|
||||
# Prevent inclusion of the assembler files below:
|
||||
enable_intel_sse=no;;
|
||||
yes|on)
|
||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [1],
|
||||
[Enable Intel SSE optimizations]);;
|
||||
*)
|
||||
AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value])
|
||||
esac])
|
||||
|
||||
# Add Intel specific files to all builds where the host_cpu is Intel ('x86*')
|
||||
# or where Intel optimizations were explicitly requested (this allows a
|
||||
# fallback if a future host CPU does not match 'x86*')
|
||||
AM_CONDITIONAL([PNG_INTEL_SSE],
|
||||
[test "$enable_intel_sse" != 'no' &&
|
||||
case "$host_cpu" in
|
||||
i?86|x86_64) :;;
|
||||
*) test "$enable_intel_sse" != '';;
|
||||
esac])
|
||||
|
||||
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
|
||||
|
||||
# Config files, substituting as above
|
||||
|
||||
Reference in New Issue
Block a user