summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-14 16:03:19 +0000
committerKarl Berry <karl@freefriends.org>2020-03-14 16:03:19 +0000
commit0cc952b8c3ea313c09a4383d41c1e6daee42cb81 (patch)
treee136a71d4fa0a9a4d59953d0d169567b57935dba /Build/source/libs/libpng
parent184155f5d438f545be4cfdc6303b465af2608afe (diff)
--enable-powerpc-vsx: import support from upstream
git-svn-id: svn://tug.org/texlive/trunk@54291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/libpng')
-rw-r--r--Build/source/libs/libpng/ChangeLog9
-rw-r--r--Build/source/libs/libpng/Makefile.am7
-rw-r--r--Build/source/libs/libpng/Makefile.in35
-rw-r--r--Build/source/libs/libpng/config.h.in9
-rwxr-xr-xBuild/source/libs/libpng/configure74
-rw-r--r--Build/source/libs/libpng/configure.ac51
6 files changed, 180 insertions, 5 deletions
diff --git a/Build/source/libs/libpng/ChangeLog b/Build/source/libs/libpng/ChangeLog
index bf11b05ae83..328706622f6 100644
--- a/Build/source/libs/libpng/ChangeLog
+++ b/Build/source/libs/libpng/ChangeLog
@@ -1,3 +1,12 @@
+2020-03-14 Karl Berry <karl@freefriends.org>
+
+ Import VSX support from upstream to TL configure.
+ * configure.ac (powerpc-vsx): new AC_ARG_ENABLE, copied
+ from libpng-src/configure.ac.
+ * Makefile.am (nodist_libpng_a_SOURCES) [PNG_POWERPC_VSX]:
+ add powerpc/*.c, copied from libpng-src/Makefile.am.
+ From Johannes Hielscher, tlbuild mail 16 Feb 2020 23:09:54 (item 2).
+
2019-05-03 Akira Kakuto <kakuto@w32tex.org>
Import libpng-1.6.37.
diff --git a/Build/source/libs/libpng/Makefile.am b/Build/source/libs/libpng/Makefile.am
index cf057b45367..e502b6c0824 100644
--- a/Build/source/libs/libpng/Makefile.am
+++ b/Build/source/libs/libpng/Makefile.am
@@ -1,7 +1,7 @@
## $Id$
## Proxy Makefile.am to build libpng for TeX Live.
##
-## Copyright 2016-2017 Karl Berry <tex-live@tug.org>
+## Copyright 2016-2020 Karl Berry <tex-live@tug.org>
## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
##
## This file is free software; the copyright holder
@@ -49,6 +49,11 @@ nodist_libpng_a_SOURCES += @LIBPNG_TREE@/arm/arm_init.c\
@LIBPNG_TREE@/arm/palette_neon_intrinsics.c
endif
+if PNG_POWERPC_VSX
+nodist_libpng_a_SOURCES += @LIBPNG_TREE@/powerpc/powerpc_init.c\
+ @LIBPNG_TREE@/powerpc/filter_vsx_intrinsics.c
+endif
+
$(libpng_a_OBJECTS): config.force
## Tests
diff --git a/Build/source/libs/libpng/Makefile.in b/Build/source/libs/libpng/Makefile.in
index e4abeb1c4ad..0c7a8345a70 100644
--- a/Build/source/libs/libpng/Makefile.in
+++ b/Build/source/libs/libpng/Makefile.in
@@ -90,6 +90,9 @@ POST_UNINSTALL = :
@PNG_ARM_NEON_TRUE@ @LIBPNG_TREE@/arm/filter_neon.S @LIBPNG_TREE@/arm/filter_neon_intrinsics.c \
@PNG_ARM_NEON_TRUE@ @LIBPNG_TREE@/arm/palette_neon_intrinsics.c
+@PNG_POWERPC_VSX_TRUE@am__append_2 = @LIBPNG_TREE@/powerpc/powerpc_init.c\
+@PNG_POWERPC_VSX_TRUE@ @LIBPNG_TREE@/powerpc/filter_vsx_intrinsics.c
+
@build_TRUE@check_PROGRAMS = pngtest$(EXEEXT)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -124,6 +127,8 @@ am__dirstamp = $(am__leading_dot)dirstamp
@PNG_ARM_NEON_TRUE@ @LIBPNG_TREE@/arm/filter_neon.$(OBJEXT) \
@PNG_ARM_NEON_TRUE@ @LIBPNG_TREE@/arm/filter_neon_intrinsics.$(OBJEXT) \
@PNG_ARM_NEON_TRUE@ @LIBPNG_TREE@/arm/palette_neon_intrinsics.$(OBJEXT)
+@PNG_POWERPC_VSX_TRUE@am__objects_2 = @LIBPNG_TREE@/powerpc/powerpc_init.$(OBJEXT) \
+@PNG_POWERPC_VSX_TRUE@ @LIBPNG_TREE@/powerpc/filter_vsx_intrinsics.$(OBJEXT)
nodist_libpng_a_OBJECTS = @LIBPNG_TREE@/png.$(OBJEXT) \
@LIBPNG_TREE@/pngerror.$(OBJEXT) \
@LIBPNG_TREE@/pngget.$(OBJEXT) @LIBPNG_TREE@/pngmem.$(OBJEXT) \
@@ -136,7 +141,8 @@ nodist_libpng_a_OBJECTS = @LIBPNG_TREE@/png.$(OBJEXT) \
@LIBPNG_TREE@/pngwio.$(OBJEXT) \
@LIBPNG_TREE@/pngwrite.$(OBJEXT) \
@LIBPNG_TREE@/pngwtran.$(OBJEXT) \
- @LIBPNG_TREE@/pngwutil.$(OBJEXT) $(am__objects_1)
+ @LIBPNG_TREE@/pngwutil.$(OBJEXT) $(am__objects_1) \
+ $(am__objects_2)
libpng_a_OBJECTS = $(nodist_libpng_a_OBJECTS)
nodist_pngtest_OBJECTS = @LIBPNG_TREE@/pngtest.$(OBJEXT)
pngtest_OBJECTS = $(nodist_pngtest_OBJECTS)
@@ -177,7 +183,9 @@ am__depfiles_remade = @LIBPNG_TREE@/$(DEPDIR)/png.Po \
@LIBPNG_TREE@/arm/$(DEPDIR)/arm_init.Po \
@LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon.Po \
@LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon_intrinsics.Po \
- @LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po
+ @LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po \
+ @LIBPNG_TREE@/powerpc/$(DEPDIR)/filter_vsx_intrinsics.Po \
+ @LIBPNG_TREE@/powerpc/$(DEPDIR)/powerpc_init.Po
am__mv = mv -f
CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
@@ -621,7 +629,7 @@ nodist_libpng_a_SOURCES = @LIBPNG_TREE@/png.c @LIBPNG_TREE@/pngerror.c \
@LIBPNG_TREE@/pngrutil.c @LIBPNG_TREE@/pngset.c \
@LIBPNG_TREE@/pngtrans.c @LIBPNG_TREE@/pngwio.c \
@LIBPNG_TREE@/pngwrite.c @LIBPNG_TREE@/pngwtran.c \
- @LIBPNG_TREE@/pngwutil.c $(am__append_1)
+ @LIBPNG_TREE@/pngwutil.c $(am__append_1) $(am__append_2)
AM_TESTS_ENVIRONMENT = LIBPNG_TREE=$(LIBPNG_TREE); export LIBPNG_TREE;
@build_TRUE@TESTS = libpng.test
@build_TRUE@dist_check_SCRIPTS = libpng.test
@@ -750,6 +758,18 @@ clean-noinstLIBRARIES:
@LIBPNG_TREE@/arm/palette_neon_intrinsics.$(OBJEXT): \
@LIBPNG_TREE@/arm/$(am__dirstamp) \
@LIBPNG_TREE@/arm/$(DEPDIR)/$(am__dirstamp)
+@LIBPNG_TREE@/powerpc/$(am__dirstamp):
+ @$(MKDIR_P) @LIBPNG_TREE@/powerpc
+ @: > @LIBPNG_TREE@/powerpc/$(am__dirstamp)
+@LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) @LIBPNG_TREE@/powerpc/$(DEPDIR)
+ @: > @LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp)
+@LIBPNG_TREE@/powerpc/powerpc_init.$(OBJEXT): \
+ @LIBPNG_TREE@/powerpc/$(am__dirstamp) \
+ @LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp)
+@LIBPNG_TREE@/powerpc/filter_vsx_intrinsics.$(OBJEXT): \
+ @LIBPNG_TREE@/powerpc/$(am__dirstamp) \
+ @LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp)
libpng.a: $(libpng_a_OBJECTS) $(libpng_a_DEPENDENCIES) $(EXTRA_libpng_a_DEPENDENCIES)
$(AM_V_at)-rm -f libpng.a
@@ -766,6 +786,7 @@ mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f @LIBPNG_TREE@/*.$(OBJEXT)
-rm -f @LIBPNG_TREE@/arm/*.$(OBJEXT)
+ -rm -f @LIBPNG_TREE@/powerpc/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@@ -790,6 +811,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon_intrinsics.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/powerpc/$(DEPDIR)/filter_vsx_intrinsics.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@@LIBPNG_TREE@/powerpc/$(DEPDIR)/powerpc_init.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@@ -1327,6 +1350,8 @@ distclean-generic:
-rm -f @LIBPNG_TREE@/$(am__dirstamp)
-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/$(am__dirstamp)
-rm -f @LIBPNG_TREE@/arm/$(am__dirstamp)
+ -rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/$(am__dirstamp)
+ -rm -f @LIBPNG_TREE@/powerpc/$(am__dirstamp)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -1359,6 +1384,8 @@ distclean: distclean-recursive
-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon.Po
-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon_intrinsics.Po
-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po
+ -rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/filter_vsx_intrinsics.Po
+ -rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/powerpc_init.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-tags
@@ -1426,6 +1453,8 @@ maintainer-clean: maintainer-clean-recursive
-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon.Po
-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/filter_neon_intrinsics.Po
-rm -f @LIBPNG_TREE@/arm/$(DEPDIR)/palette_neon_intrinsics.Po
+ -rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/filter_vsx_intrinsics.Po
+ -rm -f @LIBPNG_TREE@/powerpc/$(DEPDIR)/powerpc_init.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/Build/source/libs/libpng/config.h.in b/Build/source/libs/libpng/config.h.in
index ac10e95bbd3..dcc898c2df8 100644
--- a/Build/source/libs/libpng/config.h.in
+++ b/Build/source/libs/libpng/config.h.in
@@ -63,6 +63,15 @@
/* Enable ARM Neon optimizations */
#undef PNG_ARM_NEON_OPT
+/* Turn on POWERPC VSX optimizations at run-time */
+#undef PNG_POWERPC_VSX_API_SUPPORTED
+
+/* Check for POWERPC VSX support at run-time */
+#undef PNG_POWERPC_VSX_CHECK_SUPPORTED
+
+/* Enable POWERPC VSX optimizations */
+#undef PNG_POWERPC_VSX_OPT
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
diff --git a/Build/source/libs/libpng/configure b/Build/source/libs/libpng/configure
index c5f1b69b210..f6d965952f5 100755
--- a/Build/source/libs/libpng/configure
+++ b/Build/source/libs/libpng/configure
@@ -625,6 +625,8 @@ ac_includes_default="\
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
+PNG_POWERPC_VSX_FALSE
+PNG_POWERPC_VSX_TRUE
PNG_ARM_NEON_FALSE
PNG_ARM_NEON_TRUE
LIBPNG_DEFINES
@@ -745,6 +747,7 @@ with_system_zlib
with_zlib_includes
with_zlib_libdir
enable_arm_neon
+enable_powerpc_vsx
'
ac_precious_vars='build_alias
host_alias
@@ -1391,6 +1394,12 @@ Optional Features:
call to png_set_option; yes/on: turn on
unconditionally. If not specified: determined by the
compiler.
+ --enable-powerpc-vsx Enable POWERPC VSX optimizations: =no/off, check,
+ api, yes/on: no/off: disable the optimizations;
+ check: use internal checking code api: disable by
+ default, enable by a call to png_set_option yes/on:
+ turn on unconditionally. If not specified:
+ determined by the compiler.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -6029,6 +6038,67 @@ else
fi
+# emacs-page
+# PowerPC
+# ===
+#
+# PowerPC VSX (SIMD) support.
+
+# Check whether --enable-powerpc-vsx was given.
+if test "${enable_powerpc_vsx+set}" = set; then :
+ enableval=$enable_powerpc_vsx; case "$enableval" in
+ no|off)
+ # disable the default enabling on __ppc64__ systems:
+
+$as_echo "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h
+
+ # Prevent inclusion of the platform specific files below:
+ enable_powerpc_vsx=no;;
+ check)
+
+$as_echo "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
+ for the list of supported OSes." >&5
+$as_echo "$as_me: WARNING: --enable-powerpc-vsx Please check contrib/powerpc/README file
+ for the list of supported OSes." >&2;};;
+ api)
+
+$as_echo "#define PNG_POWERPC_VSX_API_SUPPORTED /**/" >>confdefs.h
+;;
+ yes|on)
+
+$as_echo "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
+ you want the optimizations unconditionally pass '-maltivec -mvsx'
+ or '-mcpu=power8'to the compiler." >&5
+$as_echo "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if
+ you want the optimizations unconditionally pass '-maltivec -mvsx'
+ or '-mcpu=power8'to the compiler." >&2;};;
+ *)
+ as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value" "$LINENO" 5
+ esac
+fi
+
+
+# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or
+# where POWERPC optimizations were explicitly requested (this allows a fallback if a
+# future host CPU does not match 'powerpc*')
+
+ if test "$enable_powerpc_vsx" != 'no' &&
+ case "$host_cpu" in
+ powerpc*|ppc64*) :;;
+ esac; then
+ PNG_POWERPC_VSX_TRUE=
+ PNG_POWERPC_VSX_FALSE='#'
+else
+ PNG_POWERPC_VSX_TRUE='#'
+ PNG_POWERPC_VSX_FALSE=
+fi
+
+
+
ac_config_files="$ac_config_files Makefile include/Makefile"
@@ -6185,6 +6255,10 @@ if test -z "${PNG_ARM_NEON_TRUE}" && test -z "${PNG_ARM_NEON_FALSE}"; then
as_fn_error $? "conditional \"PNG_ARM_NEON\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${PNG_POWERPC_VSX_TRUE}" && test -z "${PNG_POWERPC_VSX_FALSE}"; then
+ as_fn_error $? "conditional \"PNG_POWERPC_VSX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
diff --git a/Build/source/libs/libpng/configure.ac b/Build/source/libs/libpng/configure.ac
index bfb9836dd12..c6b07e70410 100644
--- a/Build/source/libs/libpng/configure.ac
+++ b/Build/source/libs/libpng/configure.ac
@@ -1,7 +1,7 @@
dnl $Id$
dnl Process this file with autoconf to produce a configure script.
dnl
-dnl Copyright 2016-2017 Karl Berry <tex-live@tug.org>
+dnl Copyright 2016-2020 Karl Berry <tex-live@tug.org>
dnl Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
dnl
dnl This file is free software; the copyright holder
@@ -124,6 +124,55 @@ AM_CONDITIONAL([PNG_ARM_NEON],
*) test "$enable_arm_neon" != '';;
esac])
+# emacs-page
+# PowerPC
+# ===
+#
+# PowerPC VSX (SIMD) support.
+
+AC_ARG_ENABLE([powerpc-vsx],
+AS_HELP_STRING([[[--enable-powerpc-vsx]]],
+ [Enable POWERPC VSX optimizations: =no/off, check, api, yes/on:]
+ [no/off: disable the optimizations; check: use internal checking code]
+ [api: disable by default, enable by 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 __ppc64__ systems:
+ AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
+ [Disable POWERPC VSX optimizations])
+ # Prevent inclusion of the platform specific files below:
+ enable_powerpc_vsx=no;;
+ check)
+ AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [],
+ [Check for POWERPC VSX support at run-time])
+ AC_MSG_WARN([--enable-powerpc-vsx Please check contrib/powerpc/README file]
+ [for the list of supported OSes.]);;
+ api)
+ AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [],
+ [Turn on POWERPC VSX optimizations at run-time]);;
+ yes|on)
+ AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
+ [Enable POWERPC VSX optimizations])
+ AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if]
+ [you want the optimizations unconditionally pass '-maltivec -mvsx']
+ [or '-mcpu=power8'to the compiler.]);;
+ *)
+ AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value])
+ esac])
+
+# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or
+# where POWERPC optimizations were explicitly requested (this allows a fallback if a
+# future host CPU does not match 'powerpc*')
+
+AM_CONDITIONAL([PNG_POWERPC_VSX],
+ [test "$enable_powerpc_vsx" != 'no' &&
+ case "$host_cpu" in
+ powerpc*|ppc64*) :;;
+ esac])
+
+
AC_CONFIG_FILES([Makefile include/Makefile])
AC_OUTPUT