summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng/libpng-src/configure.ac
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2024-02-24 01:06:57 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2024-02-24 01:06:57 +0000
commit0594e54cc7f3098934bba998fb5bcffb5eef6aec (patch)
tree8f90885a8db24b5c40433f0e76f70c6eca722eac /Build/source/libs/libpng/libpng-src/configure.ac
parentd255cb14003f32f27ed6ab7182ab9e7b2f16d2b9 (diff)
libpng 1.6.43
git-svn-id: svn://tug.org/texlive/trunk@70115 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/libpng/libpng-src/configure.ac')
-rw-r--r--Build/source/libs/libpng/libpng-src/configure.ac230
1 files changed, 117 insertions, 113 deletions
diff --git a/Build/source/libs/libpng/libpng-src/configure.ac b/Build/source/libs/libpng/libpng-src/configure.ac
index 61242340622..505d72ff60d 100644
--- a/Build/source/libs/libpng/libpng-src/configure.ac
+++ b/Build/source/libs/libpng/libpng-src/configure.ac
@@ -25,7 +25,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here:
-AC_INIT([libpng],[1.6.42],[png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng],[1.6.43],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts/autoconf])
# libpng does not follow GNU file name conventions (hence 'foreign')
@@ -46,17 +46,17 @@ dnl automake, so the following is not necessary (and is not defined anyway):
dnl AM_PREREQ([1.11.2])
dnl stop configure from automagically running automake
-PNGLIB_VERSION=1.6.42
+PNGLIB_VERSION=1.6.43
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
-PNGLIB_RELEASE=41
+PNGLIB_RELEASE=43
dnl End of version number stuff
AC_CONFIG_SRCDIR([pngget.c])
AC_CONFIG_HEADERS([config.h])
-# Checks for programs.
+# Check for basic programs.
AC_LANG([C])
AC_PROG_CC
AM_PROG_AS
@@ -72,16 +72,19 @@ dnl compatible later version may be used
LT_INIT([win32-dll])
LT_PREREQ([2.4.2])
-# Some awks crash when confronted with pnglibconf.dfa, do a test run now
-# to make sure this doesn't happen
-AC_MSG_CHECKING([that AWK works])
+dnl Declare the AWK variable.
+AC_ARG_VAR(AWK, [AWK language processor])
+
+# Some awk implementations crash when confronted with pnglibconf.dfa.
+# Run a test now, to make sure this doesn't happen.
+AC_MSG_CHECKING([if awk ($AWK) works])
if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
${srcdir}/pngusr.dfa 1>&2
then
- AC_MSG_RESULT([ok])
+ AC_MSG_RESULT([yes])
else
- AC_MSG_FAILURE([failed], 1)
+ AC_MSG_FAILURE([no], 1)
fi
# This is a remnant of the old cc -E validation, where it may have been
@@ -111,7 +114,7 @@ AM_CONDITIONAL([ENABLE_TOOLS],
# (it checks the compiler with a program that generates a warning).
# Add the following option to deal with this:
AC_ARG_VAR(PNG_COPTS,
- [additional flags for the C compiler, use this for options that would]
+ [additional flags for the C compiler, to be used for options that would]
[cause configure itself to fail])
AC_ARG_ENABLE(werror,
AS_HELP_STRING([[[--enable-werror[=OPT]]]],
@@ -223,9 +226,9 @@ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
if test "$have_ld_version_script" = "yes"; then
AC_MSG_CHECKING([for symbol prefix])
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
- | ${CPP-${CC-gcc} -E} - 2>&1 \
- | ${EGREP-grep} "^PREFIX=" \
- | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
+ | ${CPP:-${CC:-gcc} -E} - 2>&1 \
+ | ${EGREP:-grep} "^PREFIX=" \
+ | ${SED:-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
AC_SUBST(SYMBOL_PREFIX)
AC_MSG_RESULT($SYMBOL_PREFIX)
fi
@@ -318,7 +321,7 @@ AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG],
#
AC_ARG_ENABLE([hardware-optimizations],
AS_HELP_STRING([[[--enable-hardware-optimizations]]],
- [Enable hardware optimizations: =no/off, yes/on:]),
+ [Enable hardware optimizations: =no/off, yes/on.]),
[case "$enableval" in
no|off)
# disable hardware optimization on all systems:
@@ -376,17 +379,16 @@ AC_ARG_ENABLE([hardware-optimizations],
;;
esac])
-# ARM
-# ===
-#
-# ARM NEON (SIMD) support.
+# ARM NEON
+# ========
AC_ARG_ENABLE([arm-neon],
AS_HELP_STRING([[[--enable-arm-neon]]],
- [Enable ARM NEON optimizations: =no/off, check, api, yes/on:]
- [no/off: disable the optimizations; check: use internal checking code]
- [(deprecated and poorly supported); api: disable by default, enable by]
- [a call to png_set_option; yes/on: turn on unconditionally.]
+ [Enable ARM NEON optimizations: =no/off, check, api, yes/on.]
+ [no/off: disable the optimizations;]
+ [check: use internal checking code (deprecated and poorly supported);]
+ [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)
@@ -404,16 +406,17 @@ AC_ARG_ENABLE([arm-neon],
yes|on)
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
[Enable ARM Neon optimizations])
- AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
- [you want the optimizations unconditionally pass -mfpu=neon]
- [to the compiler.]);;
+ AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';]
+ [if you want the optimizations unconditionally,]
+ [pass '-mfpu=neon' to the compiler.]);;
*)
- AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value])
+ AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}:]
+ [invalid argument])
esac])
# Add ARM-specific files to all builds where $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*')
+# 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' &&
@@ -422,17 +425,16 @@ AM_CONDITIONAL([PNG_ARM_NEON],
*) test "$enable_arm_neon" != '' ;;
esac])
-# MIPS
-# ====
-#
-# MIPS MSA (SIMD) support.
+# MIPS MSA
+# ========
AC_ARG_ENABLE([mips-msa],
AS_HELP_STRING([[[--enable-mips-msa]]],
- [Enable MIPS MSA optimizations: =no/off, check, api, yes/on:]
- [no/off: disable the optimizations; check: use internal checking code]
- [(deprecated and poorly supported); api: disable by default, enable by]
- [a call to png_set_option; yes/on: turn on unconditionally.]
+ [Enable MIPS MSA optimizations: =no/off, check, api, yes/on.]
+ [no/off: disable the optimizations;]
+ [check: use internal checking code (deprecated and poorly supported);]
+ [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)
@@ -450,16 +452,17 @@ AC_ARG_ENABLE([mips-msa],
yes|on)
AC_DEFINE([PNG_MIPS_MSA_OPT], [2],
[Enable MIPS MSA optimizations])
- AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api', if]
- [you want the optimizations unconditionally pass '-mmsa -mfp64']
- [to the compiler.]);;
+ AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api';]
+ [if you want the optimizations unconditionally,]
+ [pass '-mmsa -mfp64' to the compiler.]);;
*)
- AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}: invalid value])
+ AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}:]
+ [invalid argument])
esac])
# Add MIPS-specific files to all builds where $host_cpu is mips ('mips*') or
-# where MIPS optimizations were explicitly requested (this allows a fallback
-# if a future host CPU does not match 'mips*')
+# where MIPS optimizations were explicitly requested. (This allows a fallback
+# if a future host CPU does not match 'mips*'.)
AM_CONDITIONAL([PNG_MIPS_MSA],
[test "$enable_mips_msa" != 'no' &&
@@ -467,17 +470,16 @@ AM_CONDITIONAL([PNG_MIPS_MSA],
mipsel*|mips64el*) : ;;
esac])
-# MIPS
-# ===
-#
-# MIPS MMI (SIMD) support.
+# MIPS MMI
+# ========
AC_ARG_ENABLE([mips-mmi],
AS_HELP_STRING([[[--enable-mips-mmi]]],
- [Enable MIPS MMI optimizations: =no/off, check, api, yes/on:]
- [no/off: disable the optimizations; check: use internal checking code]
- [(deprecated and poorly supported); api: disable by default, enable by]
- [a call to png_set_option; yes/on: turn on unconditionally.]
+ [Enable MIPS MMI optimizations: =no/off, check, api, yes/on.]
+ [no/off: disable the optimizations;]
+ [check: use internal checking code (deprecated and poorly supported);]
+ [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)
@@ -495,31 +497,30 @@ AC_ARG_ENABLE([mips-mmi],
yes|on)
AC_DEFINE([PNG_MIPS_MMI_OPT], [1],
[Enable MIPS MMI optimizations])
- AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api', if]
- [you want the optimizations unconditionally pass '-mloongson-mmi -march=loongson3a']
- [to the compiler.]);;
+ AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api';]
+ [if you want the optimizations unconditionally]
+ [pass '-mloongson-mmi -march=loongson3a' to the compiler.]);;
*)
- AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}: invalid value])
+ AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}:]
+ [invalid argument])
esac])
# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or
-# where MIPS optimizations were explicitly requested (this allows a fallback if a
-# future host CPU does not match 'mips*')
+# where MIPS optimizations were explicitly requested. (This allows a fallback
+# if a future host CPU does not match 'mips*'.)
AM_CONDITIONAL([PNG_MIPS_MMI],
[test "$enable_mips_mmi" != 'no' &&
case "$host_cpu" in
- mipsel*|mips64el*) :;;
+ mipsel*|mips64el*) : ;;
esac])
-# INTEL
-# =====
-#
-# INTEL SSE (SIMD) support.
+# INTEL SSE
+# =========
AC_ARG_ENABLE([intel-sse],
AS_HELP_STRING([[[--enable-intel-sse]]],
- [Enable Intel SSE optimizations: =no/off, yes/on:]
+ [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.]),
@@ -534,12 +535,13 @@ AC_ARG_ENABLE([intel-sse],
AC_DEFINE([PNG_INTEL_SSE_OPT], [1],
[Enable Intel SSE optimizations]);;
*)
- AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value])
+ AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}:]
+ [invalid argument])
esac])
# Add Intel-specific files to all builds where $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*')
+# 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
@@ -547,16 +549,15 @@ AM_CONDITIONAL([PNG_INTEL_SSE],
*) test "$enable_intel_sse" != '' ;;
esac])
-# PowerPC
-# =======
-#
-# PowerPC VSX (SIMD) support.
+# POWERPC VSX
+# ===========
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]
+ [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
@@ -569,24 +570,25 @@ AS_HELP_STRING([[[--enable-powerpc-vsx]]],
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.]);;
+ AC_MSG_WARN([--enable-powerpc-vsx: please see contrib/powerpc/README]
+ [for the list of supported systems.]);;
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_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])
+ AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}:]
+ [invalid argument])
esac])
-# 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*')
+# 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' &&
@@ -594,28 +596,8 @@ AM_CONDITIONAL([PNG_POWERPC_VSX],
powerpc*|ppc64*) : ;;
esac])
-# LOONGARCH
-# ===
-#
-# LOONGARCH LSX (SIMD) support
-
-if test "$LSX_CFLAGS" = ''; then
- LSX_CFLAGS="-mlsx"
-fi
-
-compiler_support_loongarch_lsx=no
-AC_MSG_CHECKING(whether to use loongarch LSX intrinsics)
-save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $LSX_CFLAGS"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include<lsxintrin.h>
-int main(){
- __m128i a, b, c;
- a = __lsx_vadd_w(b, c);
- return 0;
-}]])],compiler_support_loongarch_lsx=yes)
-CFLAGS=$save_CFLAGS
-AC_MSG_RESULT($compiler_support_loongarch_lsx)
+# LOONGARCH LSX
+# =============
AC_ARG_ENABLE([loongarch-lsx],
AS_HELP_STRING([[[--enable-loongarch-lsx]]],
@@ -635,26 +617,48 @@ AC_ARG_ENABLE([loongarch-lsx],
[Enable LOONGARCH LSX optimizations])
;;
*)
- AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}: invalid value])
+ AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}:]
+ [invalid argument])
esac])
-if test "$enable_loongarch_lsx" != 'no'; then
- if test $compiler_support_loongarch_lsx = yes; then
- AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1], [Enable LOONGARCH LSX optimizations])
+if test "$enable_loongarch_lsx" != "no" &&
+ case "$host_cpu" in
+ loongarch*) : ;;
+ *) test "$enable_loongarch_lsx" != '' ;;
+ esac
+then
+ compiler_support_loongarch_lsx=no
+ AC_MSG_CHECKING(whether to use LoongArch LSX intrinsics)
+ save_CFLAGS="$CFLAGS"
+ LSX_CFLAGS="${LSX_CFLAGS:-"-mlsx"}"
+ CFLAGS="$CFLAGS $LSX_CFLAGS"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <lsxintrin.h>
+int main(){
+ __m128i a, b, c;
+ a = __lsx_vadd_w(b, c);
+ return 0;
+}]])],compiler_support_loongarch_lsx=yes)
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT($compiler_support_loongarch_lsx)
+ if test "$compiler_support_loongarch_lsx" = "yes"; then
+ AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
+ [Enable LOONGARCH LSX optimizations])
else
AC_MSG_WARN([Compiler does not support loongarch LSX.])
fi
fi
-# Add LOONGARCH specific files to all builds where the host_cpu is loongarch ('loongarch*') or
-# where LOONGARCH optimizations were explicitly requested (this allows a fallback if a
-# future host CPU does not match 'loongarch*')
+# Add LoongArch specific files to all builds where the host_cpu is loongarch
+# ('loongarch*') or where LoongArch optimizations were explicitly requested.
+# (This allows a fallback if a future host CPU does not match 'loongarch*'.)
AM_CONDITIONAL([PNG_LOONGARCH_LSX],
- [test "$enable_loongarch_lsx" != 'no' && test $compiler_support_loongarch_lsx = yes &&
+ [test "$enable_loongarch_lsx" != "no" &&
+ test "$compiler_support_loongarch_lsx" = "yes" &&
case "$host_cpu" in
- loongarch*) :;;
- *) test "$enable_loongarch_lsx" != '';;
+ loongarch*) : ;;
+ *) test "$enable_loongarch_lsx" != '' ;;
esac])
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])