summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-01-23 02:20:55 +0000
committerKarl Berry <karl@freefriends.org>2023-01-23 02:20:55 +0000
commitce87d3e82b1424ed0f553a02b4d5aee2f80e791e (patch)
tree1cf27dc703e8d20a2004a7776c0398be3bd449b5
parent30f87a46b83511af27ebe5fb408b6526b12df013 (diff)
use KPSE_CANONICAL_HOST so that optimization checks might work
git-svn-id: svn://tug.org/texlive/trunk@65609 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/libs/libpng/ChangeLog9
-rw-r--r--Build/source/libs/libpng/Makefile.in12
-rw-r--r--Build/source/libs/libpng/aclocal.m437
-rwxr-xr-xBuild/source/libs/libpng/configure142
-rw-r--r--Build/source/libs/libpng/configure.ac42
-rw-r--r--Build/source/libs/libpng/include/Makefile.in10
6 files changed, 219 insertions, 33 deletions
diff --git a/Build/source/libs/libpng/ChangeLog b/Build/source/libs/libpng/ChangeLog
index 37517300d20..5adeb74a254 100644
--- a/Build/source/libs/libpng/ChangeLog
+++ b/Build/source/libs/libpng/ChangeLog
@@ -1,3 +1,12 @@
+2023-01-22 Karl Berry <karl@freefriends.org>
+
+ * configure.ac (KPSE_CANONICAL_HOST): call this,
+ since we use $host_cpu in the optimization checks.
+ Else could be determined wrong. Report from Dick Koch,
+ karl mail 22 Jan 2023 00:43:11.
+ (PNG_ARM_NEON, PNG_POWERPC_VSX): report results;
+ also sync comments with upstream (trivial typos).
+
2022-11-21 Akira Kakuto <kakuto@jcom.zaq.ne.jp>
Import libpng-1.6.39.
diff --git a/Build/source/libs/libpng/Makefile.in b/Build/source/libs/libpng/Makefile.in
index ac89bcea608..7f7d404fc50 100644
--- a/Build/source/libs/libpng/Makefile.in
+++ b/Build/source/libs/libpng/Makefile.in
@@ -86,6 +86,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
@PNG_ARM_NEON_TRUE@am__append_1 = @LIBPNG_TREE@/arm/arm_init.c\
@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
@@ -454,6 +456,8 @@ am__DIST_COMMON = $(srcdir)/../../am/dist_hook.am \
$(srcdir)/../../am/rebuild.am $(srcdir)/../../am/reconfig.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/../../build-aux/compile \
+ $(top_srcdir)/../../build-aux/config.guess \
+ $(top_srcdir)/../../build-aux/config.sub \
$(top_srcdir)/../../build-aux/depcomp \
$(top_srcdir)/../../build-aux/install-sh \
$(top_srcdir)/../../build-aux/missing \
@@ -580,14 +584,22 @@ am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
+build = @build@
build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+host = @host@
host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
diff --git a/Build/source/libs/libpng/aclocal.m4 b/Build/source/libs/libpng/aclocal.m4
index 8c7b07821de..881457a9e3e 100644
--- a/Build/source/libs/libpng/aclocal.m4
+++ b/Build/source/libs/libpng/aclocal.m4
@@ -128,6 +128,43 @@ AC_DEFUN([AM_AUX_DIR_EXPAND],
am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
+# AM_COND_IF -*- Autoconf -*-
+
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_COND_IF
+# _AM_COND_ELSE
+# _AM_COND_ENDIF
+# --------------
+# These macros are only used for tracing.
+m4_define([_AM_COND_IF])
+m4_define([_AM_COND_ELSE])
+m4_define([_AM_COND_ENDIF])
+
+# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
+# ---------------------------------------
+# If the shell condition COND is true, execute IF-TRUE, otherwise execute
+# IF-FALSE. Allow automake to learn about conditional instantiating macros
+# (the AC_CONFIG_FOOS).
+AC_DEFUN([AM_COND_IF],
+[m4_ifndef([_AM_COND_VALUE_$1],
+ [m4_fatal([$0: no such condition "$1"])])dnl
+_AM_COND_IF([$1])dnl
+if test -z "$$1_TRUE"; then :
+ m4_n([$2])[]dnl
+m4_ifval([$3],
+[_AM_COND_ELSE([$1])dnl
+else
+ $3
+])dnl
+_AM_COND_ENDIF([$1])dnl
+fi[]dnl
+])
+
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
diff --git a/Build/source/libs/libpng/configure b/Build/source/libs/libpng/configure
index 57d56fd68bd..c50451e4232 100755
--- a/Build/source/libs/libpng/configure
+++ b/Build/source/libs/libpng/configure
@@ -676,6 +676,14 @@ am__fastdepCCAS_TRUE
CCASDEPMODE
CCASFLAGS
CCAS
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
WARNING_CFLAGS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
@@ -1400,6 +1408,10 @@ Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
@@ -2433,7 +2445,7 @@ as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
# Auxiliary files required by this configure script.
-ac_aux_files="compile missing install-sh"
+ac_aux_files="config.guess config.sub compile missing install-sh"
# Locations in which to look for auxiliary files.
ac_aux_dir_candidates="${srcdir}/../../build-aux"
@@ -4601,6 +4613,89 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
+# Because we use $host_cpu below.
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+if test "x$host_alias" != x && test "x$build_alias" = x
+then :
+ as_fn_error $? "when cross-compiling you must specify both --host and --build." "$LINENO" 5
+fi
+eval kpse_build_alias=\${build_alias-$build}
+
+
ac_config_headers="$ac_config_headers config.h"
@@ -6582,7 +6677,7 @@ then :
printf "%s\n" "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
# Prevent inclusion of the assembler files below:
- enable_arm_neon=no;;
+ enable_arm_neon=no ;;
check)
printf "%s\n" "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h
@@ -6607,14 +6702,14 @@ printf "%s\n" "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'ap
fi
-# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or
-# where ARM optimizations were explicitly requested (this allows a fallback if a
-# future host CPU does not match 'arm*')
+# Add ARM-specific files to all builds where the host_cpu is arm ('arm*') or
+# where ARM optimizations were explicitly requested (this allows a fallback
+# if a future host CPU does not match 'arm*')
if test "$enable_arm_neon" != 'no' &&
case "$host_cpu" in
- arm*|aarch64*) :;;
- *) test "$enable_arm_neon" != '';;
+ arm*|aarch64*) : ;;
+ *) test "$enable_arm_neon" != '' ;;
esac; then
PNG_ARM_NEON_TRUE=
PNG_ARM_NEON_FALSE='#'
@@ -6624,6 +6719,14 @@ else
fi
+if test -z "$PNG_ARM_NEON_TRUE"; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: arm_neon opts on (host_cpu=$host_cpu)" >&5
+printf "%s\n" "$as_me: arm_neon opts on (host_cpu=$host_cpu)" >&6;}
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: arm_neon opts off (host_cpu=$host_cpu)" >&5
+printf "%s\n" "$as_me: arm_neon opts off (host_cpu=$host_cpu)" >&6;}
+fi
+
# emacs-page
# PowerPC
# ===
@@ -6639,8 +6742,8 @@ then :
printf "%s\n" "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h
- # Prevent inclusion of the platform specific files below:
- enable_powerpc_vsx=no;;
+ # Prevent inclusion of the platform-specific files below:
+ enable_powerpc_vsx=no ;;
check)
printf "%s\n" "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h
@@ -6659,23 +6762,23 @@ printf "%s\n" "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h
{ printf "%s\n" "$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
+ or '-mcpu=power8' to the compiler." >&5
printf "%s\n" "$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;};;
+ 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*')
+# Add PowerPC-specific files to all builds where $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*) :;;
+ powerpc*|ppc64*) : ;;
esac; then
PNG_POWERPC_VSX_TRUE=
PNG_POWERPC_VSX_FALSE='#'
@@ -6684,8 +6787,13 @@ else
PNG_POWERPC_VSX_FALSE=
fi
-
-
+if test -z "$PNG_POWERPC_VSX_TRUE"; then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: powerpc_vsx opts on (host_cpu=$host_cpu)" >&5
+printf "%s\n" "$as_me: powerpc_vsx opts on (host_cpu=$host_cpu)" >&6;}
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: powerpc_vsx opts off (host_cpu=$host_cpu)" >&5
+printf "%s\n" "$as_me: powerpc_vsx opts off (host_cpu=$host_cpu)" >&6;}
+fi
ac_config_files="$ac_config_files Makefile include/Makefile"
diff --git a/Build/source/libs/libpng/configure.ac b/Build/source/libs/libpng/configure.ac
index c6b07e70410..ade69b838fc 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-2020 Karl Berry <tex-live@tug.org>
+dnl Copyright 2016-2023 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
@@ -17,6 +17,9 @@ AC_CONFIG_MACRO_DIR([../../m4])
KPSE_BASIC([libpng])
+# Because we use $host_cpu below.
+KPSE_CANONICAL_HOST
+
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
@@ -96,7 +99,7 @@ AC_ARG_ENABLE([arm-neon],
AC_DEFINE([PNG_ARM_NEON_OPT], [0],
[Disable ARM Neon optimizations])
# Prevent inclusion of the assembler files below:
- enable_arm_neon=no;;
+ enable_arm_neon=no ;;
check)
AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
[Check for ARM Neon support at run-time]);;
@@ -113,17 +116,22 @@ AC_ARG_ENABLE([arm-neon],
AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value])
esac])
-# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or
-# where ARM optimizations were explicitly requested (this allows a fallback if a
-# future host CPU does not match 'arm*')
+# Add ARM-specific files to all builds where the host_cpu is arm ('arm*') or
+# where ARM optimizations were explicitly requested (this allows a fallback
+# if a future host CPU does not match 'arm*')
AM_CONDITIONAL([PNG_ARM_NEON],
[test "$enable_arm_neon" != 'no' &&
case "$host_cpu" in
- arm*|aarch64*) :;;
- *) test "$enable_arm_neon" != '';;
+ arm*|aarch64*) : ;;
+ *) test "$enable_arm_neon" != '' ;;
esac])
+AM_COND_IF([PNG_ARM_NEON],
+ AC_MSG_NOTICE([[arm_neon opts on (host_cpu=$host_cpu)]]),
+ AC_MSG_NOTICE([[arm_neon opts off (host_cpu=$host_cpu)]]),
+)
+
# emacs-page
# PowerPC
# ===
@@ -142,8 +150,8 @@ AS_HELP_STRING([[[--enable-powerpc-vsx]]],
# 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;;
+ # 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])
@@ -157,22 +165,24 @@ AS_HELP_STRING([[[--enable-powerpc-vsx]]],
[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.]);;
+ [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*')
+# Add PowerPC-specific files to all builds where $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*) :;;
+ powerpc*|ppc64*) : ;;
esac])
-
-
+AM_COND_IF([PNG_POWERPC_VSX],
+ AC_MSG_NOTICE([[powerpc_vsx opts on (host_cpu=$host_cpu)]]),
+ AC_MSG_NOTICE([[powerpc_vsx opts off (host_cpu=$host_cpu)]]),
+)
AC_CONFIG_FILES([Makefile include/Makefile])
AC_OUTPUT
diff --git a/Build/source/libs/libpng/include/Makefile.in b/Build/source/libs/libpng/include/Makefile.in
index 07be0edec0a..efb05a4d0cf 100644
--- a/Build/source/libs/libpng/include/Makefile.in
+++ b/Build/source/libs/libpng/include/Makefile.in
@@ -85,6 +85,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
subdir = include
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \
@@ -194,14 +196,22 @@ am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
+build = @build@
build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+host = @host@
host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@