texlive[65609] Build/source/libs/libpng: use KPSE_CANONICAL_HOST so

commits+karl at tug.org commits+karl at tug.org
Mon Jan 23 03:20:56 CET 2023


Revision: 65609
          http://tug.org/svn/texlive?view=revision&revision=65609
Author:   karl
Date:     2023-01-23 03:20:55 +0100 (Mon, 23 Jan 2023)
Log Message:
-----------
use KPSE_CANONICAL_HOST so that optimization checks might work

Modified Paths:
--------------
    trunk/Build/source/libs/libpng/ChangeLog
    trunk/Build/source/libs/libpng/Makefile.in
    trunk/Build/source/libs/libpng/aclocal.m4
    trunk/Build/source/libs/libpng/configure
    trunk/Build/source/libs/libpng/configure.ac
    trunk/Build/source/libs/libpng/include/Makefile.in

Modified: trunk/Build/source/libs/libpng/ChangeLog
===================================================================
--- trunk/Build/source/libs/libpng/ChangeLog	2023-01-23 00:49:22 UTC (rev 65608)
+++ trunk/Build/source/libs/libpng/ChangeLog	2023-01-23 02:20:55 UTC (rev 65609)
@@ -1,3 +1,12 @@
+2023-01-22  Karl Berry  <karl at 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 at jcom.zaq.ne.jp>
 
 	Import libpng-1.6.39.

Modified: trunk/Build/source/libs/libpng/Makefile.in
===================================================================
--- trunk/Build/source/libs/libpng/Makefile.in	2023-01-23 00:49:22 UTC (rev 65608)
+++ trunk/Build/source/libs/libpng/Makefile.in	2023-01-23 02:20:55 UTC (rev 65609)
@@ -86,6 +86,8 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
 @PNG_ARM_NEON_TRUE at 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 @@
 	$(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,7 +584,11 @@
 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@
@@ -587,7 +595,11 @@
 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@

Modified: trunk/Build/source/libs/libpng/aclocal.m4
===================================================================
--- trunk/Build/source/libs/libpng/aclocal.m4	2023-01-23 00:49:22 UTC (rev 65608)
+++ trunk/Build/source/libs/libpng/aclocal.m4	2023-01-23 02:20:55 UTC (rev 65609)
@@ -128,6 +128,43 @@
 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.

Modified: trunk/Build/source/libs/libpng/configure
===================================================================
--- trunk/Build/source/libs/libpng/configure	2023-01-23 00:49:22 UTC (rev 65608)
+++ trunk/Build/source/libs/libpng/configure	2023-01-23 02:20:55 UTC (rev 65609)
@@ -676,6 +676,14 @@
 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-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 " 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 @@
 
 
 
+# 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 @@
 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 @@
 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 @@
 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 @@
 
 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,10 +6762,10 @@
 
          { 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
@@ -6669,13 +6772,13 @@
 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 @@
   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"
 
 

Modified: trunk/Build/source/libs/libpng/configure.ac
===================================================================
--- trunk/Build/source/libs/libpng/configure.ac	2023-01-23 00:49:22 UTC (rev 65608)
+++ trunk/Build/source/libs/libpng/configure.ac	2023-01-23 02:20:55 UTC (rev 65609)
@@ -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 at tug.org>
+dnl   Copyright 2016-2023 Karl Berry <tex-live at tug.org>
 dnl   Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 dnl
 dnl   This file is free software; the copyright holder
@@ -17,6 +17,9 @@
 
 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_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_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 @@
          # 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 @@
                    [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

Modified: trunk/Build/source/libs/libpng/include/Makefile.in
===================================================================
--- trunk/Build/source/libs/libpng/include/Makefile.in	2023-01-23 00:49:22 UTC (rev 65608)
+++ trunk/Build/source/libs/libpng/include/Makefile.in	2023-01-23 02:20:55 UTC (rev 65609)
@@ -85,6 +85,8 @@
 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,7 +196,11 @@
 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@
@@ -201,7 +207,11 @@
 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@



More information about the tex-live-commits mailing list.