mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
140 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7cecdcae07 | ||
![]() |
cf59edd364 | ||
![]() |
2b978915d8 | ||
![]() |
254a64ec30 | ||
![]() |
9eb25bd899 | ||
![]() |
8087a21d0a | ||
![]() |
2e5f296bfa | ||
![]() |
4266c75f40 | ||
![]() |
f451a4de09 | ||
![]() |
6aa47debba | ||
![]() |
3391bb98e3 | ||
![]() |
21895b05ab | ||
![]() |
be81ebe1a4 | ||
![]() |
edf46621f3 | ||
![]() |
5dc5937b30 | ||
![]() |
7084241c75 | ||
![]() |
640204280f | ||
![]() |
740366c32b | ||
![]() |
5d53dfd20c | ||
![]() |
5b62726ced | ||
![]() |
a5830bfcb1 | ||
![]() |
3bca02e274 | ||
![]() |
197bbfe0d5 | ||
![]() |
0cc6436ef5 | ||
![]() |
f04c457a51 | ||
![]() |
5631b9b952 | ||
![]() |
dc71f481ff | ||
![]() |
e2c1579816 | ||
![]() |
cff8620272 | ||
![]() |
5be32eb35c | ||
![]() |
611bf1016c | ||
![]() |
0e37c0b477 | ||
![]() |
7108843467 | ||
![]() |
2b0eb78656 | ||
![]() |
ffb8e8b26f | ||
![]() |
cc5ee6b213 | ||
![]() |
b4800bae33 | ||
![]() |
ea12796820 | ||
![]() |
643dbda7d6 | ||
![]() |
34e3f7a65b | ||
![]() |
3e67531078 | ||
![]() |
23bdc7a6c4 | ||
![]() |
69a3e5bfd1 | ||
![]() |
c90491724e | ||
![]() |
98448e372d | ||
![]() |
f2b0f5fe1c | ||
![]() |
7101a5569f | ||
![]() |
e046c0dc3b | ||
![]() |
34005e3d3d | ||
![]() |
44f97f08d7 | ||
![]() |
044536de92 | ||
![]() |
738f5e743c | ||
![]() |
f20e66aa93 | ||
![]() |
5d09501462 | ||
![]() |
872555f4ba | ||
![]() |
bb7e922914 | ||
![]() |
b20e6fb314 | ||
![]() |
5356b94169 | ||
![]() |
812c34c13c | ||
![]() |
68e090e700 | ||
![]() |
8c7ed2e3b2 | ||
![]() |
2519a03418 | ||
![]() |
c4b20d0a3a | ||
![]() |
a8242dd947 | ||
![]() |
171bdd3a6c | ||
![]() |
0024abd279 | ||
![]() |
fcb0bca15f | ||
![]() |
deadeea7a2 | ||
![]() |
9cc729b523 | ||
![]() |
36a16fd761 | ||
![]() |
4d7c99334e | ||
![]() |
19a5a5eba3 | ||
![]() |
8a28d0558e | ||
![]() |
03660a516b | ||
![]() |
f753baae52 | ||
![]() |
92e8581f12 | ||
![]() |
8ffc967e8a | ||
![]() |
51f5bd68b9 | ||
![]() |
3714c584b1 | ||
![]() |
2a845ff819 | ||
![]() |
0cc367aaea | ||
![]() |
3042f74de0 | ||
![]() |
4599354be8 | ||
![]() |
823c2d80dc | ||
![]() |
75748d93ce | ||
![]() |
6f786ff0f6 | ||
![]() |
c1cc0f3f4c | ||
![]() |
d9d70e6506 | ||
![]() |
76e5ec217f | ||
![]() |
65470ac86c | ||
![]() |
8b1d489bce | ||
![]() |
a7a8faeefa | ||
![]() |
d7d950e8bd | ||
![]() |
f14d5fcd1e | ||
![]() |
7c90057cfe | ||
![]() |
1bf304c43c | ||
![]() |
9ee82380da | ||
![]() |
642b5d81e3 | ||
![]() |
d3cf9b6e22 | ||
![]() |
d288a1dd36 | ||
![]() |
0a27b48e94 | ||
![]() |
65cd5fa3e5 | ||
![]() |
f3a45ac2e9 | ||
![]() |
d161ce6116 | ||
![]() |
b3bcbf9f82 | ||
![]() |
b8a0a5401f | ||
![]() |
529e69e76a | ||
![]() |
cd5e582fd6 | ||
![]() |
bcb3124141 | ||
![]() |
cb08862674 | ||
![]() |
18ab7d09dd | ||
![]() |
68d7ce8040 | ||
![]() |
c0f3dd43d8 | ||
![]() |
222dd7ca49 | ||
![]() |
e3c7b26fbd | ||
![]() |
b7276eca01 | ||
![]() |
ef153d5325 | ||
![]() |
f5e92d7697 | ||
![]() |
88ab4f592d | ||
![]() |
3117b5f94a | ||
![]() |
5a7e87fc04 | ||
![]() |
8cc22a8c15 | ||
![]() |
843dbb7579 | ||
![]() |
1d1cc9ae18 | ||
![]() |
1964d560e9 | ||
![]() |
68ba4f1f7d | ||
![]() |
0e204b7364 | ||
![]() |
53a7f4e320 | ||
![]() |
fcdec9c66e | ||
![]() |
222086586b | ||
![]() |
40878fd6dc | ||
![]() |
20f819c29e | ||
![]() |
7e18d14296 | ||
![]() |
43d6ad3e15 | ||
![]() |
33ef48b6d6 | ||
![]() |
532fec0214 | ||
![]() |
e4a31f024b | ||
![]() |
9e538750d9 | ||
![]() |
ceed2a3cf6 | ||
![]() |
f1848a3b56 |
@ -2,8 +2,8 @@ version: 1.6.x-{build}
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /libpng[0-1][0-7]/
|
||||
- /v[0-1][.][0-7][.][0-9]+/
|
||||
- /libpng[0-1][0-8]/
|
||||
- /v[0-1][.][0-8][.][0-9]+/
|
||||
|
||||
image:
|
||||
- Visual Studio 2022
|
||||
@ -48,6 +48,7 @@ install:
|
||||
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe integrate install'
|
||||
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows'
|
||||
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe integrate install'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-ninja'
|
||||
|
||||
before_build:
|
||||
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_GENERATOR=Visual Studio 17 2022'
|
||||
@ -58,11 +59,11 @@ before_build:
|
||||
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_VARS=-DPNG_TESTS=0'
|
||||
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_GENERATOR=Ninja'
|
||||
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake'
|
||||
- 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang.exe'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" set CI_CMAKE_GENERATOR=Unix Makefiles'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set PATH=C:\msys64\mingw32\bin;%PATH%'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set PATH=C:\msys64\mingw64\bin;%PATH%'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" set CI_CC=%ARCH%-w64-mingw32-gcc.exe'
|
||||
- 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" set CI_CMAKE_GENERATOR=Ninja'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" set CI_CC=gcc'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set MSYSTEM=MINGW32'
|
||||
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set MSYSTEM=MINGW64'
|
||||
- 'set CI_CMAKE_BUILD_FLAGS=-j2'
|
||||
- 'set CI_CTEST_FLAGS=-j2'
|
||||
- 'set CI_MAKE_FLAGS=-j2'
|
||||
@ -76,4 +77,5 @@ build_script:
|
||||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="makefiles" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_makefiles.sh"'
|
||||
|
||||
cache:
|
||||
- C:\tools\vcpkg\installed
|
||||
- 'C:\tools\vcpkg\installed'
|
||||
- 'C:\msys64\var\cache\pacman'
|
||||
|
94
.cmake-format.yaml
Normal file
94
.cmake-format.yaml
Normal file
@ -0,0 +1,94 @@
|
||||
# https://pypi.org/project/cmakelang
|
||||
# https://github.com/cheshirekow/cmake_format
|
||||
|
||||
# ----------------------
|
||||
# Options for formatting
|
||||
# ----------------------
|
||||
|
||||
# How wide to allow formatted cmake files
|
||||
# TODO: Reflow the CMake files to allow setting the maximum line width to 100.
|
||||
line_width: 255
|
||||
|
||||
# How many spaces to tab for indent
|
||||
tab_size: 2
|
||||
|
||||
# If true, lines are indented using tab characters (utf-8 0x09) instead of
|
||||
# <tab_size> space characters (utf-8 0x20). In cases where the layout would
|
||||
# require a fractional tab character, the behavior of the fractional
|
||||
# indentation is governed by <fractional_tab_policy>
|
||||
use_tabchars: false
|
||||
|
||||
# If <use_tabchars> is True, then the value of this variable indicates how
|
||||
# fractional indentions are handled during whitespace replacement. If set to
|
||||
# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set
|
||||
# to `round-up` fractional indentation is replaced with a single tab character
|
||||
# (utf-8 0x09) effectively shifting the column to the next tabstop
|
||||
fractional_tab_policy: "use-space"
|
||||
|
||||
# Enable comment markup parsing and reflow
|
||||
enable_markup: false
|
||||
|
||||
# -------------------
|
||||
# Options for linting
|
||||
# -------------------
|
||||
|
||||
# Lint codes to disable
|
||||
disabled_codes: [
|
||||
# TODO:
|
||||
# Reconcile the CMake variable names with the patterns below, then
|
||||
# re-enable the "invalid variable name XXX" messages.
|
||||
"C0103",
|
||||
|
||||
# TODO:
|
||||
# Add brief COMMENT arguments to the `add_custom_target` commands.
|
||||
"C0113",
|
||||
]
|
||||
|
||||
# Regular expression pattern describing valid function names
|
||||
function_pattern: "[0-9a-z_]+"
|
||||
|
||||
# Regular expression pattern describing valid macro names
|
||||
macro_pattern: "[0-9A-Z_]+"
|
||||
|
||||
# Regular expression pattern describing valid names for variables with global
|
||||
# (cache) scope
|
||||
global_var_pattern: "[A-Z][0-9A-Z_]+"
|
||||
|
||||
# Regular expression pattern describing valid names for variables with global
|
||||
# scope (but internal semantic)
|
||||
internal_var_pattern: "_[A-Z][0-9A-Z_]+"
|
||||
|
||||
# Regular expression pattern describing valid names for variables with local
|
||||
# scope
|
||||
local_var_pattern: "[a-z][a-z0-9_]+"
|
||||
|
||||
# Regular expression pattern describing valid names for privatedirectory
|
||||
# variables
|
||||
private_var_pattern: "_[0-9a-z_]+"
|
||||
|
||||
# Regular expression pattern describing valid names for public directory
|
||||
# variables
|
||||
public_var_pattern: "[A-Z][0-9A-Z_]+"
|
||||
|
||||
# Regular expression pattern describing valid names for function/macro
|
||||
# arguments and loop variables.
|
||||
argument_var_pattern: "[a-z][a-z0-9_]+"
|
||||
|
||||
# Regular expression pattern describing valid names for keywords used in
|
||||
# functions or macros
|
||||
keyword_pattern: "[A-Z][0-9A-Z_]+"
|
||||
|
||||
# In the heuristic for C0201, how many conditionals to match within a loop in
|
||||
# before considering the loop a parser
|
||||
max_conditionals_custom_parser: 2
|
||||
|
||||
# Require at least this many newlines between statements;
|
||||
# require no more than this many newlines between statements;
|
||||
# etc.
|
||||
min_statement_spacing: 1
|
||||
max_statement_spacing: 2
|
||||
max_returns: 6
|
||||
max_branches: 12
|
||||
max_arguments: 5
|
||||
max_localvars: 15
|
||||
max_statements: 50
|
@ -8,29 +8,41 @@ insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.txt]
|
||||
indent_size = unset
|
||||
indent_style = space
|
||||
|
||||
[*.[chS]]
|
||||
indent_size = 3
|
||||
indent_style = space
|
||||
max_doc_length = 80
|
||||
max_line_length = 80
|
||||
|
||||
[*.dfa]
|
||||
indent_size = 3
|
||||
indent_style = space
|
||||
max_doc_length = 80
|
||||
max_line_length = 80
|
||||
|
||||
[*.{awk,cmake}]
|
||||
[*.awk]
|
||||
indent_size = 3
|
||||
indent_style = space
|
||||
max_doc_length = 80
|
||||
max_line_length = 100
|
||||
|
||||
[*.{in,sh}]
|
||||
[*.cmake]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
max_doc_length = 80
|
||||
max_line_length = 100
|
||||
|
||||
[*.sh]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
max_doc_length = 100
|
||||
max_line_length = 100
|
||||
|
||||
[{Makefile.in,ltmain.sh}]
|
||||
[{Makefile.in,aclocal.m4,ltmain.sh}]
|
||||
indent_size = unset
|
||||
indent_style = unset
|
||||
insert_final_newline = unset
|
||||
max_doc_length = unset
|
||||
|
9
.editorconfig-checker.json
Normal file
9
.editorconfig-checker.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"Disable": {
|
||||
"IndentSize": true
|
||||
},
|
||||
"Exclude": [
|
||||
".git/",
|
||||
"out/"
|
||||
]
|
||||
}
|
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@ -4,9 +4,11 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- libpng16
|
||||
- libpng18
|
||||
pull_request:
|
||||
branches:
|
||||
- libpng16
|
||||
- libpng18
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@ -21,6 +23,8 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Install yamllint
|
||||
run: pip install yamllint
|
||||
- name: Install editorconfig-checker
|
||||
uses: editorconfig-checker/action-editorconfig-checker@main
|
||||
- name: Check out the code
|
||||
uses: actions/checkout@v4
|
||||
- name: Run the linting script
|
||||
|
130
.gitignore
vendored
130
.gitignore
vendored
@ -31,6 +31,7 @@
|
||||
# Compiled executables
|
||||
*.app/
|
||||
*.exe
|
||||
a.out
|
||||
|
||||
# Debug files
|
||||
*.dSYM/
|
||||
@ -38,42 +39,121 @@
|
||||
*.pdb
|
||||
*.su
|
||||
|
||||
# Libpng configuration and build artifacts
|
||||
# Tag files
|
||||
TAGS
|
||||
.TAGS
|
||||
!TAGS/
|
||||
tags
|
||||
.tags
|
||||
!tags/
|
||||
gtags.files
|
||||
GTAGS
|
||||
GRTAGS
|
||||
GPATH
|
||||
GSYMS
|
||||
cscope.files
|
||||
cscope.out
|
||||
cscope.*.out
|
||||
|
||||
# Text editing and text processing artifacts
|
||||
\#*\#
|
||||
.\#*
|
||||
[._]*.sw[a-p]
|
||||
[._]sw[a-p]
|
||||
*.bak
|
||||
*.orig
|
||||
*.rej
|
||||
*.tmp
|
||||
*~
|
||||
|
||||
# IDE files and directories
|
||||
## Eclipse
|
||||
.cproject/
|
||||
.project/
|
||||
.settings/
|
||||
## Embarcadero RAD Studio
|
||||
*.cbproj.*
|
||||
__recovery/
|
||||
## JetBrains
|
||||
.idea/
|
||||
## NetBeans
|
||||
nbbuild/
|
||||
nbdist/
|
||||
nbproject/
|
||||
## Visual Studio
|
||||
.vs/
|
||||
### Visual Studio user files
|
||||
*.rsuser
|
||||
*.sln.docstates
|
||||
*.suo
|
||||
*.user
|
||||
*.userprefs
|
||||
### Visual Studio cache files (for older versions)
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.VC.db
|
||||
*.VC.opendb
|
||||
ipch/
|
||||
## Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
## (Various)
|
||||
*.*cache
|
||||
*.cache*
|
||||
[._]*_history
|
||||
.history/
|
||||
[Bb]ackup*/
|
||||
|
||||
# Build, test and CI output directories
|
||||
*[Dd]ebug/
|
||||
[Dd]ebug*/
|
||||
*[Rr]elease/
|
||||
[Rr]elease*/
|
||||
[._]build*/
|
||||
/[Bb]uild*/
|
||||
/[Oo]ut/
|
||||
|
||||
# Libpng configuration and auxiliary build artifacts
|
||||
*.out
|
||||
.deps/
|
||||
*out.png
|
||||
[._]deps/
|
||||
[._]libs/
|
||||
.dirstamp
|
||||
/Makefile
|
||||
/autom4te.cache/
|
||||
/config.guess~
|
||||
/config.h.in~
|
||||
/config*~
|
||||
/config.h
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub~
|
||||
/configure~
|
||||
/install-sh~
|
||||
/libpng-config
|
||||
/libpng.pc
|
||||
/install*~
|
||||
/libpng*-config
|
||||
/libpng*.pc
|
||||
/libpng.vers
|
||||
/libpng16-config
|
||||
/libpng16.pc
|
||||
/libtool
|
||||
/stamp-h1
|
||||
CMake*.json
|
||||
!CMakePresets.json
|
||||
CMakeLists.txt.*
|
||||
pnglibconf.[ch]
|
||||
pnglibconf.dfn
|
||||
pnglibconf.pre
|
||||
pngprefix.h
|
||||
|
||||
# Libpng test artifacts
|
||||
png-fix-itxt
|
||||
pngcp
|
||||
pngfix
|
||||
pngimage
|
||||
pngstest
|
||||
pngtest
|
||||
pngunknown
|
||||
pngvalid
|
||||
timepng
|
||||
pngout.png
|
||||
|
||||
# Libpng CI artifacts
|
||||
out/
|
||||
# Libpng test programs, scripts and artifacts
|
||||
/test-suite.log
|
||||
/tests/*.log
|
||||
/tests/*.trs
|
||||
/png-fix-itxt
|
||||
/pngcp
|
||||
/pngfix
|
||||
/pngimage
|
||||
/pngstest
|
||||
/pngtest
|
||||
/pngunknown
|
||||
/pngvalid
|
||||
/timepng
|
||||
|
34
.travis.yml
34
.travis.yml
@ -1,34 +0,0 @@
|
||||
branches:
|
||||
except:
|
||||
- /libpng[0-1][0-7]/
|
||||
- /v[0-1][.][0-7][.][0-9]+/
|
||||
|
||||
language: c
|
||||
|
||||
os:
|
||||
- freebsd
|
||||
- linux
|
||||
- osx
|
||||
|
||||
env:
|
||||
- AUTOMATION=cmake CI_CMAKE_VARS="-DPNG_HARDWARE_OPTIMIZATIONS=ON"
|
||||
- AUTOMATION=cmake CI_CMAKE_VARS="-DPNG_HARDWARE_OPTIMIZATIONS=OFF"
|
||||
- AUTOMATION=configure CI_CONFIGURE_FLAGS="--enable-hardware-optimizations"
|
||||
- AUTOMATION=configure CI_CONFIGURE_FLAGS="--disable-hardware-optimizations"
|
||||
- AUTOMATION=makefiles
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
env: AUTOMATION=cmake CI_CMAKE_GENERATOR=Xcode
|
||||
|
||||
before_script:
|
||||
- 'if test "$TRAVIS_OS_NAME" = "linux"; then export CI_CC="gcc"; else export CI_CC="clang"; fi'
|
||||
- 'if test "$TRAVIS_OS_NAME" != "osx"; then export CI_SANITIZERS="address,undefined"; fi'
|
||||
- 'export CI_MAKEFILES="scripts/makefile.$CI_CC scripts/makefile.std"'
|
||||
- 'export CI_MAKE_FLAGS=-j2'
|
||||
- 'export CI_CMAKE_BUILD_FLAGS=-j2'
|
||||
- 'export CI_CTEST_FLAGS=-j2'
|
||||
|
||||
script:
|
||||
- './ci/ci_verify_$AUTOMATION.sh'
|
56
ANNOUNCE
56
ANNOUNCE
@ -1,5 +1,13 @@
|
||||
libpng 1.6.43 - February 23, 2024
|
||||
=================================
|
||||
libpng 1.6.51.git
|
||||
=================
|
||||
|
||||
This is a development version, not intended to be a public release.
|
||||
It will be replaced by a public release, or by another development
|
||||
version, at a later time.
|
||||
|
||||
|
||||
libpng 1.6.50 - July 1, 2025
|
||||
============================
|
||||
|
||||
This is a public release of libpng, intended for use in production code.
|
||||
|
||||
@ -9,13 +17,13 @@ Files available for download
|
||||
|
||||
Source files with LF line endings (for Unix/Linux):
|
||||
|
||||
* libpng-1.6.43.tar.xz (LZMA-compressed, recommended)
|
||||
* libpng-1.6.43.tar.gz (deflate-compressed)
|
||||
* libpng-1.6.50.tar.xz (LZMA-compressed, recommended)
|
||||
* libpng-1.6.50.tar.gz (deflate-compressed)
|
||||
|
||||
Source files with CRLF line endings (for Windows):
|
||||
|
||||
* lpng1643.7z (LZMA-compressed, recommended)
|
||||
* lpng1643.zip (deflate-compressed)
|
||||
* lpng1650.7z (LZMA-compressed, recommended)
|
||||
* lpng1650.zip (deflate-compressed)
|
||||
|
||||
Other information:
|
||||
|
||||
@ -25,36 +33,18 @@ Other information:
|
||||
* TRADEMARK.md
|
||||
|
||||
|
||||
Changes from version 1.6.42 to version 1.6.43
|
||||
Changes from version 1.6.49 to version 1.6.50
|
||||
---------------------------------------------
|
||||
|
||||
* Fixed the row width check in png_check_IHDR().
|
||||
This corrected a bug that was specific to the 16-bit platforms,
|
||||
and removed a spurious compiler warning from the 64-bit builds.
|
||||
(Reported by Jacek Caban; fixed by John Bowler)
|
||||
* Added eXIf chunk support to the push-mode reader in pngpread.c.
|
||||
(Contributed by Chris Blume)
|
||||
* Added contrib/pngexif for the benefit of the users who would like
|
||||
to inspect the content of eXIf chunks.
|
||||
* Added contrib/conftest/basic.dfa, a basic build-time configuration.
|
||||
* Improved the detection of the RVV Extension on the RISC-V platform.
|
||||
(Contributed by Filip Wasil)
|
||||
* Replaced inline ASM with C intrinsics in the RVV code.
|
||||
(Contributed by Filip Wasil)
|
||||
* Fixed a decoder defect in which unknown chunks trailing IDAT, set
|
||||
to go through the unknown chunk handler, incorrectly triggered
|
||||
out-of-place IEND errors.
|
||||
(Contributed by John Bowler)
|
||||
* Fixed a preprocessor condition in pngread.c that broke build-time
|
||||
configurations like contrib/conftest/pngcp.dfa.
|
||||
(Contributed by John Bowler)
|
||||
* Added CMake build support for LoongArch LSX.
|
||||
(Contributed by GuXiWei)
|
||||
* Fixed a CMake build error that occurred under a peculiar state of the
|
||||
dependency tree. This was a regression introduced in libpng-1.6.41.
|
||||
(Contributed by Dan Rosser)
|
||||
* Marked the installed libpng headers as system headers in CMake.
|
||||
(Contributed by Benjamin Buch)
|
||||
* Updated the build support for RISCOS.
|
||||
(Contributed by Cameron Cawley)
|
||||
* Updated the makefiles to allow cross-platform builds to initialize
|
||||
conventional make variables like AR and ARFLAGS.
|
||||
* Added various improvements to the CI scripts in areas like version
|
||||
consistency verification and text linting.
|
||||
* Added version consistency verification to pngtest.c also.
|
||||
* Fixed the CMake file for cross-platform builds that require `libm`.
|
||||
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
|
||||
|
7
AUTHORS
7
AUTHORS
@ -17,8 +17,10 @@ Authors, for copyright and licensing purposes.
|
||||
* James Yu
|
||||
* John Bowler
|
||||
* Kevin Bracey
|
||||
* Lucas Chollet
|
||||
* Magnus Holmgren
|
||||
* Mandar Sahastrabuddhe
|
||||
* Manfred Schlaegl
|
||||
* Mans Rullgard
|
||||
* Matt Sarett
|
||||
* Mike Klein
|
||||
@ -39,8 +41,9 @@ Authors, for copyright and licensing purposes.
|
||||
- Zixu Wang (王子旭)
|
||||
* Arm Holdings
|
||||
- Richard Townsend
|
||||
* Google Inc.
|
||||
* Google LLC
|
||||
- Dan Field
|
||||
- Dragoș Tiselice
|
||||
- Leon Scroggins III
|
||||
- Matt Sarett
|
||||
- Mike Klein
|
||||
@ -50,6 +53,8 @@ Authors, for copyright and licensing purposes.
|
||||
- GuXiWei (顾希伟)
|
||||
- JinBo (金波)
|
||||
- ZhangLixia (张利霞)
|
||||
* Samsung Group
|
||||
- Filip Wasil
|
||||
|
||||
The build projects, the build scripts, the test scripts, and other
|
||||
files in the "projects", "scripts" and "tests" directories, have
|
||||
|
84
CHANGES
84
CHANGES
@ -6196,6 +6196,90 @@ Version 1.6.43 [February 23, 2024]
|
||||
consistency verification and text linting.
|
||||
Added version consistency verification to pngtest.c also.
|
||||
|
||||
Version 1.6.44 [September 12, 2024]
|
||||
Hardened calculations in chroma handling to prevent overflows, and
|
||||
relaxed a constraint in cHRM validation to accomodate the standard
|
||||
ACES AP1 set of color primaries.
|
||||
(Contributed by John Bowler)
|
||||
Removed the ASM implementation of ARM Neon optimizations and updated
|
||||
the build accordingly. Only the remaining C implementation shall be
|
||||
used from now on, thus ensuring the support of the PAC/BTI security
|
||||
features on ARM64.
|
||||
(Contributed by Ross Burton and John Bowler)
|
||||
Fixed the pickup of the PNG_HARDWARE_OPTIMIZATIONS option in the
|
||||
CMake build on FreeBSD/amd64. This is an important performance fix
|
||||
on this platform.
|
||||
Applied various fixes and improvements to the CMake build.
|
||||
(Contributed by Eric Riff, Benjamin Buch and Erik Scholz)
|
||||
Added fuzzing targets for the simplified read API.
|
||||
(Contributed by Mikhail Khachayants)
|
||||
Fixed a build error involving pngtest.c under a custom config.
|
||||
This was a regression introduced in a code cleanup in libpng-1.6.43.
|
||||
(Contributed by Ben Wagner)
|
||||
Fixed and improved the config files for AppVeyor CI and Travis CI.
|
||||
|
||||
Version 1.6.45 [January 7, 2025]
|
||||
Added support for the cICP chunk.
|
||||
(Contributed by Lucas Chollet and John Bowler)
|
||||
Adjusted and improved various checks in colorspace calculations.
|
||||
(Contributed by John Bowler)
|
||||
Rearranged the write order of colorspace chunks for better conformance
|
||||
with the PNG v3 draft specification.
|
||||
(Contributed by John Bowler)
|
||||
Raised the minimum required CMake version from 3.6 to 3.14.
|
||||
Forked off a development branch for libpng version 1.8.
|
||||
|
||||
Version 1.6.46 [January 23, 2025]
|
||||
Added support for the mDCV and cLLI chunks.
|
||||
(Contributed by John Bowler)
|
||||
Fixed a build issue affecting C89 compilers.
|
||||
This was a regression introduced in libpng-1.6.45.
|
||||
(Contributed by John Bowler)
|
||||
Added makefile.c89, specifically for testing C89 compilers.
|
||||
Cleaned up contrib/pngminus: corrected an old typo, removed an old
|
||||
workaround, and updated the CMake file.
|
||||
|
||||
Version 1.6.47 [February 18, 2025]
|
||||
Modified the behaviour of colorspace chunks in order to adhere
|
||||
to the new precedence rules formulated in the latest draft of
|
||||
the PNG Specification.
|
||||
(Contributed by John Bowler)
|
||||
Fixed a latent bug in `png_write_iCCP`.
|
||||
This would have been a read-beyond-end-of-malloc vulnerability,
|
||||
introduced early in the libpng-1.6.0 development, yet (fortunately!)
|
||||
it was inaccessible before the above-mentioned modification of the
|
||||
colorspace precedence rules, due to pre-existing colorspace checks.
|
||||
(Reported by Bob Friesenhahn; fixed by John Bowler)
|
||||
|
||||
Version 1.6.48 [April 30, 2025]
|
||||
Fixed the floating-point version of the mDCv setter `png_set_mDCv`.
|
||||
(Reported by Mohit Bakshi; fixed by John Bowler)
|
||||
Added #error directives to discourage the inclusion of private
|
||||
libpng implementation header files in PNG-supporting applications.
|
||||
Added the CMake build option `PNG_LIBCONF_HEADER`, to be used as an
|
||||
alternative to `DFA_XTRA`.
|
||||
Removed the Travis CI configuration files, with heartfelt thanks for
|
||||
their generous support of our project over the past five years!
|
||||
|
||||
Version 1.6.49 [June 12, 2025]
|
||||
Added SIMD-optimized code for the RISC-V Vector Extension (RVV).
|
||||
(Contributed by Manfred Schlaegl, Dragos Tiselice and Filip Wasil)
|
||||
Added various fixes and improvements to the build scripts and to
|
||||
the sample code.
|
||||
|
||||
Version 1.6.50 [July 1, 2025]
|
||||
Improved the detection of the RVV Extension on the RISC-V platform.
|
||||
(Contributed by Filip Wasil)
|
||||
Replaced inline ASM with C intrinsics in the RVV code.
|
||||
(Contributed by Filip Wasil)
|
||||
Fixed a decoder defect in which unknown chunks trailing IDAT, set
|
||||
to go through the unknown chunk handler, incorrectly triggered
|
||||
out-of-place IEND errors.
|
||||
(Contributed by John Bowler)
|
||||
Fixed the CMake file for cross-platform builds that require `libm`.
|
||||
|
||||
Version 1.6.51 [TODO]
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
|
||||
Subscription is required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
|
1067
CMakeLists.txt
1067
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
11
INSTALL
11
INSTALL
@ -1,4 +1,3 @@
|
||||
|
||||
Installing libpng
|
||||
|
||||
Contents
|
||||
@ -137,7 +136,7 @@ Your directory structure should look like this:
|
||||
depcomp, install-sh, mkinstalldirs, test-pngtest.sh, etc.
|
||||
contrib
|
||||
arm-neon, conftest, examples, gregbook, libtests, pngminim,
|
||||
pngminus, pngsuite, tools, visupng
|
||||
pngminus, pngsuite, tools, visupng, riscv-rvv
|
||||
projects
|
||||
owatcom, visualc71, vstudio
|
||||
scripts
|
||||
@ -290,6 +289,7 @@ such as one of
|
||||
--enable-mips-msa=yes
|
||||
--enable-intel-sse=yes
|
||||
--enable-powerpc-vsx=yes
|
||||
--enable-riscv-rvv=yes
|
||||
|
||||
or enable them all at once with
|
||||
|
||||
@ -302,6 +302,7 @@ or more of
|
||||
CPPFLAGS += "-DPNG_MIPS_MSA"
|
||||
CPPFLAGS += "-DPNG_INTEL_SSE"
|
||||
CPPFLAGS += "-DPNG_POWERPC_VSX"
|
||||
CPPFLAGS += "-DPNG_RISCV_RVV"
|
||||
|
||||
See for example scripts/makefile.linux-opt
|
||||
|
||||
@ -318,13 +319,15 @@ to disable a particular one,
|
||||
or via compiler-command options such as
|
||||
|
||||
CPPFLAGS += "-DPNG_ARM_NEON_OPT=0, -DPNG_MIPS_MSA_OPT=0,
|
||||
-DPNG_INTEL_SSE_OPT=0, -DPNG_POWERPC_VSX_OPT=0"
|
||||
-DPNG_INTEL_SSE_OPT=0, -DPNG_POWERPC_VSX_OPT=0,
|
||||
-DPNG_RISCV_RVV_OPT=0"
|
||||
|
||||
If you are using cmake, hardware optimizations are "on"
|
||||
by default. To disable them, use
|
||||
|
||||
cmake . -DPNG_ARM_NEON=no -DPNG_INTEL_SSE=no \
|
||||
-DPNG_MIPS_MSA=no -DPNG_POWERPC_VSX=no
|
||||
-DPNG_MIPS_MSA=no -DPNG_POWERPC_VSX=no \
|
||||
-DPNG_RISCV_RVV=no
|
||||
|
||||
or disable them all at once with
|
||||
|
||||
|
4
LICENSE
4
LICENSE
@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
||||
PNG Reference Library License version 2
|
||||
---------------------------------------
|
||||
|
||||
* Copyright (c) 1995-2024 The PNG Reference Library Authors.
|
||||
* Copyright (c) 2018-2024 Cosmin Truta.
|
||||
* Copyright (c) 1995-2025 The PNG Reference Library Authors.
|
||||
* Copyright (c) 2018-2025 Cosmin Truta.
|
||||
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
||||
* Copyright (c) 1996-1997 Andreas Dilger.
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
19
Makefile.am
19
Makefile.am
@ -1,6 +1,6 @@
|
||||
# Makefile.am, the source file for Makefile.in (and hence Makefile), is
|
||||
#
|
||||
# Copyright (c) 2018-2024 Cosmin Truta
|
||||
# Copyright (c) 2018-2025 Cosmin Truta
|
||||
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
||||
#
|
||||
# This code is released under the libpng license.
|
||||
@ -108,7 +108,7 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
||||
|
||||
if PNG_ARM_NEON
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
|
||||
arm/filter_neon.S arm/filter_neon_intrinsics.c \
|
||||
arm/filter_neon_intrinsics.c \
|
||||
arm/palette_neon_intrinsics.c
|
||||
endif
|
||||
|
||||
@ -134,13 +134,20 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += powerpc/powerpc_init.c\
|
||||
powerpc/filter_vsx_intrinsics.c
|
||||
endif
|
||||
|
||||
if PNG_RISCV_RVV
|
||||
noinst_LTLIBRARIES= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES = riscv/riscv_init.c\
|
||||
riscv/filter_rvv_intrinsics.c
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS = -march=rv64gv
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||
endif
|
||||
|
||||
if PNG_LOONGARCH_LSX
|
||||
noinst_LTLIBRARIES= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES = loongarch/loongarch_lsx_init.c\
|
||||
loongarch/filter_lsx_intrinsics.c
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS = -mlsx
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
# libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
endif
|
||||
|
||||
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
||||
@ -163,6 +170,10 @@ else
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
||||
endif
|
||||
|
||||
if PNG_RISCV_RVV
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES += libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||
endif
|
||||
|
||||
if PNG_LOONGARCH_LSX
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES += libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
endif
|
||||
@ -199,7 +210,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
|
||||
config.sub configure depcomp install-sh ltmain.sh missing
|
||||
|
||||
# PNG_COPTS give extra options for the C compiler to be used on all compilation
|
||||
# steps (unless targe_CFLAGS is specified; that will take precedence over
|
||||
# steps (unless target_CFLAGS is specified; that will take precedence over
|
||||
# AM_CFLAGS)
|
||||
PNG_COPTS = @PNG_COPTS@
|
||||
AM_CFLAGS = ${PNG_COPTS}
|
||||
|
376
Makefile.in
376
Makefile.in
@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.18.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
# Makefile.am, the source file for Makefile.in (and hence Makefile), is
|
||||
#
|
||||
# Copyright (c) 2018-2024 Cosmin Truta
|
||||
# Copyright (c) 2018-2025 Cosmin Truta
|
||||
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
||||
#
|
||||
# This code is released under the libpng license.
|
||||
@ -83,6 +83,8 @@ am__make_running_with_option = \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
am__rm_f = rm -f $(am__rm_f_notfound)
|
||||
am__rm_rf = rm -rf $(am__rm_f_notfound)
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
@ -108,7 +110,7 @@ host_triplet = @host@
|
||||
@ENABLE_TOOLS_TRUE@bin_PROGRAMS = pngfix$(EXEEXT) \
|
||||
@ENABLE_TOOLS_TRUE@ png-fix-itxt$(EXEEXT)
|
||||
@PNG_ARM_NEON_TRUE@am__append_2 = arm/arm_init.c\
|
||||
@PNG_ARM_NEON_TRUE@ arm/filter_neon.S arm/filter_neon_intrinsics.c \
|
||||
@PNG_ARM_NEON_TRUE@ arm/filter_neon_intrinsics.c \
|
||||
@PNG_ARM_NEON_TRUE@ arm/palette_neon_intrinsics.c
|
||||
|
||||
@PNG_MIPS_MSA_TRUE@am__append_3 = mips/mips_init.c\
|
||||
@ -128,8 +130,9 @@ host_triplet = @host@
|
||||
@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_9 = -Wl,--version-script=libpng.vers
|
||||
# Only restricted exports when possible
|
||||
@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_10 = -export-symbols libpng.sym
|
||||
@PNG_LOONGARCH_LSX_TRUE@am__append_11 = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
@DO_PNG_PREFIX_TRUE@am__append_12 = -DPNG_PREFIX='@PNG_PREFIX@'
|
||||
@PNG_RISCV_RVV_TRUE@am__append_11 = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||
@PNG_LOONGARCH_LSX_TRUE@am__append_12 = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
@DO_PNG_PREFIX_TRUE@am__append_13 = -DPNG_PREFIX='@PNG_PREFIX@'
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/scripts/autoconf/libtool.m4 \
|
||||
@ -177,10 +180,9 @@ am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
{ test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
|
||||
}
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
|
||||
am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \
|
||||
@ -188,13 +190,13 @@ am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \
|
||||
pngrtran.c pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c \
|
||||
pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \
|
||||
pngpriv.h pngstruct.h pngusr.dfa arm/arm_init.c \
|
||||
arm/filter_neon.S arm/filter_neon_intrinsics.c \
|
||||
arm/palette_neon_intrinsics.c mips/mips_init.c \
|
||||
mips/filter_msa_intrinsics.c mips/filter_mmi_inline_assembly.c \
|
||||
intel/intel_init.c intel/filter_sse2_intrinsics.c \
|
||||
powerpc/powerpc_init.c powerpc/filter_vsx_intrinsics.c
|
||||
arm/filter_neon_intrinsics.c arm/palette_neon_intrinsics.c \
|
||||
mips/mips_init.c mips/filter_msa_intrinsics.c \
|
||||
mips/filter_mmi_inline_assembly.c intel/intel_init.c \
|
||||
intel/filter_sse2_intrinsics.c powerpc/powerpc_init.c \
|
||||
powerpc/filter_vsx_intrinsics.c
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
@PNG_ARM_NEON_TRUE@am__objects_1 = arm/arm_init.lo arm/filter_neon.lo \
|
||||
@PNG_ARM_NEON_TRUE@am__objects_1 = arm/arm_init.lo \
|
||||
@PNG_ARM_NEON_TRUE@ arm/filter_neon_intrinsics.lo \
|
||||
@PNG_ARM_NEON_TRUE@ arm/palette_neon_intrinsics.lo
|
||||
@PNG_MIPS_MSA_TRUE@am__objects_2 = mips/mips_init.lo \
|
||||
@ -238,6 +240,18 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LINK = $(LIBTOOL) $(AM_V_lt) \
|
||||
$(CCLD) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS) \
|
||||
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
@PNG_LOONGARCH_LSX_TRUE@am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_rpath =
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_LIBADD =
|
||||
am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES_DIST = \
|
||||
riscv/riscv_init.c riscv/filter_rvv_intrinsics.c
|
||||
@PNG_RISCV_RVV_TRUE@am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS = riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo \
|
||||
@PNG_RISCV_RVV_TRUE@ riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS = \
|
||||
$(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS)
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_LINK = $(LIBTOOL) $(AM_V_lt) \
|
||||
--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
|
||||
$(CCLD) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS) \
|
||||
$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
@PNG_RISCV_RVV_TRUE@am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_rpath =
|
||||
am__png_fix_itxt_SOURCES_DIST = contrib/tools/png-fix-itxt.c
|
||||
@ENABLE_TOOLS_TRUE@am_png_fix_itxt_OBJECTS = \
|
||||
@ENABLE_TOOLS_TRUE@ contrib/tools/png-fix-itxt.$(OBJEXT)
|
||||
@ -312,7 +326,7 @@ am__depfiles_remade = ./$(DEPDIR)/png.Plo ./$(DEPDIR)/pngerror.Plo \
|
||||
./$(DEPDIR)/pngtest.Po ./$(DEPDIR)/pngtrans.Plo \
|
||||
./$(DEPDIR)/pngwio.Plo ./$(DEPDIR)/pngwrite.Plo \
|
||||
./$(DEPDIR)/pngwtran.Plo ./$(DEPDIR)/pngwutil.Plo \
|
||||
arm/$(DEPDIR)/arm_init.Plo arm/$(DEPDIR)/filter_neon.Plo \
|
||||
arm/$(DEPDIR)/arm_init.Plo \
|
||||
arm/$(DEPDIR)/filter_neon_intrinsics.Plo \
|
||||
arm/$(DEPDIR)/palette_neon_intrinsics.Plo \
|
||||
contrib/libtests/$(DEPDIR)/pngimage.Po \
|
||||
@ -331,18 +345,10 @@ am__depfiles_remade = ./$(DEPDIR)/png.Plo ./$(DEPDIR)/pngerror.Plo \
|
||||
mips/$(DEPDIR)/filter_msa_intrinsics.Plo \
|
||||
mips/$(DEPDIR)/mips_init.Plo \
|
||||
powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo \
|
||||
powerpc/$(DEPDIR)/powerpc_init.Plo
|
||||
powerpc/$(DEPDIR)/powerpc_init.Plo \
|
||||
riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo \
|
||||
riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo
|
||||
am__mv = mv -f
|
||||
CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
|
||||
LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CCASFLAGS) $(CCASFLAGS)
|
||||
AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
|
||||
am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
|
||||
am__v_CPPAS_0 = @echo " CPPAS " $@;
|
||||
am__v_CPPAS_1 =
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
@ -364,12 +370,14 @@ am__v_CCLD_1 =
|
||||
SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
||||
$(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
||||
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES) \
|
||||
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES) \
|
||||
$(png_fix_itxt_SOURCES) $(pngcp_SOURCES) $(pngfix_SOURCES) \
|
||||
$(pngimage_SOURCES) $(pngstest_SOURCES) $(pngtest_SOURCES) \
|
||||
$(pngunknown_SOURCES) $(pngvalid_SOURCES) $(timepng_SOURCES)
|
||||
DIST_SOURCES = \
|
||||
$(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST) \
|
||||
$(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES_DIST) \
|
||||
$(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES_DIST) \
|
||||
$(am__png_fix_itxt_SOURCES_DIST) $(am__pngcp_SOURCES_DIST) \
|
||||
$(am__pngfix_SOURCES_DIST) $(am__pngimage_SOURCES_DIST) \
|
||||
$(am__pngstest_SOURCES_DIST) $(am__pngtest_SOURCES_DIST) \
|
||||
@ -513,12 +521,13 @@ am__sh_e_setup = case $$- in *e*) set +e;; esac
|
||||
# Default flags passed to test drivers.
|
||||
am__common_driver_flags = \
|
||||
--color-tests "$$am__color_tests" \
|
||||
$$am__collect_skipped_logs \
|
||||
--enable-hard-errors "$$am__enable_hard_errors" \
|
||||
--expect-failure "$$am__expect_failure"
|
||||
# To be inserted before the command running the test. Creates the
|
||||
# directory for the log if needed. Stores in $dir the directory
|
||||
# containing $f, in $tst the test, in $log the log. Executes the
|
||||
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
|
||||
# developer-defined test setup AM_TESTS_ENVIRONMENT (if any), and
|
||||
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
|
||||
# will run the test scripts (or their associated LOG_COMPILER, if
|
||||
# thy have one).
|
||||
@ -537,6 +546,11 @@ if test -f "./$$f"; then dir=./; \
|
||||
elif test -f "$$f"; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
tst=$$dir$$f; log='$@'; \
|
||||
if test -n '$(IGNORE_SKIPPED_LOGS)'; then \
|
||||
am__collect_skipped_logs='--collect-skipped-logs no'; \
|
||||
else \
|
||||
am__collect_skipped_logs=''; \
|
||||
fi; \
|
||||
if test -n '$(DISABLE_HARD_ERRORS)'; then \
|
||||
am__enable_hard_errors=no; \
|
||||
else \
|
||||
@ -592,20 +606,22 @@ distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \
|
||||
; rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz
|
||||
GZIP_ENV = --best
|
||||
GZIP_ENV = -9
|
||||
DIST_TARGETS = dist-xz dist-gzip
|
||||
# Exists only to be overridden by the user if desired.
|
||||
AM_DISTCHECK_DVI_TARGET = dvi
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = \
|
||||
find . \( -type f -a \! \
|
||||
\( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print
|
||||
|
||||
#distribute headers in /usr/include/libpng/*
|
||||
pkgincludedir = $(includedir)/$(PNGLIB_BASENAME)
|
||||
@ -688,7 +704,7 @@ PNGLIB_RELEASE = @PNGLIB_RELEASE@
|
||||
PNGLIB_VERSION = @PNGLIB_VERSION@
|
||||
|
||||
# PNG_COPTS give extra options for the C compiler to be used on all compilation
|
||||
# steps (unless targe_CFLAGS is specified; that will take precedence over
|
||||
# steps (unless target_CFLAGS is specified; that will take precedence over
|
||||
# AM_CFLAGS)
|
||||
PNG_COPTS = @PNG_COPTS@
|
||||
PNG_PREFIX = @PNG_PREFIX@
|
||||
@ -709,8 +725,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__rm_f_notfound = @am__rm_f_notfound@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
am__xargs_n = @am__xargs_n@
|
||||
|
||||
# generate the -config scripts if required
|
||||
binconfigs = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
|
||||
@ -826,21 +844,28 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c \
|
||||
$(am__append_4) $(am__append_5) $(am__append_6) \
|
||||
$(am__append_7)
|
||||
@PNG_LOONGARCH_LSX_TRUE@noinst_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
@PNG_RISCV_RVV_TRUE@noinst_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||
@PNG_RISCV_RVV_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_SOURCES = riscv/riscv_init.c\
|
||||
@PNG_RISCV_RVV_TRUE@ riscv/filter_rvv_intrinsics.c
|
||||
|
||||
@PNG_RISCV_RVV_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS = -march=rv64gv
|
||||
@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
@PNG_RISCV_RVV_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la
|
||||
@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES = loongarch/loongarch_lsx_init.c\
|
||||
@PNG_LOONGARCH_LSX_TRUE@ loongarch/filter_lsx_intrinsics.c
|
||||
|
||||
@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS = -mlsx
|
||||
@PNG_LOONGARCH_LSX_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
# libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
||||
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \
|
||||
-export-dynamic -version-number \
|
||||
@PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 \
|
||||
$(am__append_8) $(am__append_9) $(am__append_10)
|
||||
@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = \
|
||||
@HAVE_LD_VERSION_SCRIPT_FALSE@ libpng.sym $(am__append_11)
|
||||
@HAVE_LD_VERSION_SCRIPT_FALSE@ libpng.sym $(am__append_11) \
|
||||
@HAVE_LD_VERSION_SCRIPT_FALSE@ $(am__append_12)
|
||||
@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = \
|
||||
@HAVE_LD_VERSION_SCRIPT_TRUE@ libpng.vers $(am__append_11)
|
||||
@HAVE_LD_VERSION_SCRIPT_TRUE@ libpng.vers $(am__append_11) \
|
||||
@HAVE_LD_VERSION_SCRIPT_TRUE@ $(am__append_12)
|
||||
pkginclude_HEADERS = png.h pngconf.h
|
||||
nodist_pkginclude_HEADERS = pnglibconf.h
|
||||
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
|
||||
@ -874,7 +899,7 @@ SUFFIXES = .chk .out
|
||||
SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0' \
|
||||
-DPNGLIB_VERSION='@PNGLIB_VERSION@' \
|
||||
-DSYMBOL_PREFIX='$(SYMBOL_PREFIX)' -DPNG_NO_USE_READ_MACROS \
|
||||
-DPNG_BUILDING_SYMBOL_TABLE $(am__append_12)
|
||||
-DPNG_BUILDING_SYMBOL_TABLE $(am__append_13)
|
||||
|
||||
# EXT_LIST is a list of the possibly library directory extensions, this exists
|
||||
# because we can't find a good way of discovering the file extensions that are
|
||||
@ -885,7 +910,7 @@ all: $(BUILT_SOURCES) config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .chk .out .S .c .lo .log .o .obj .test .test$(EXEEXT) .trs
|
||||
.SUFFIXES: .chk .out .c .lo .log .o .obj .test .test$(EXEEXT) .trs
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@ -925,12 +950,12 @@ config.h: stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(AM_V_at)rm -f stamp-h1
|
||||
$(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
$(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
$(AM_V_at)rm -f stamp-h1
|
||||
$(AM_V_at)touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
@ -977,25 +1002,15 @@ uninstall-binPROGRAMS:
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
cd "$(DESTDIR)$(bindir)" && $(am__rm_f) $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(bin_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(bin_PROGRAMS:$(EXEEXT)=)
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
$(am__rm_f) $(check_PROGRAMS)
|
||||
test -z "$(EXEEXT)" || $(am__rm_f) $(check_PROGRAMS:$(EXEEXT)=)
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@ -1022,44 +1037,39 @@ uninstall-libLTLIBRARIES:
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
-$(am__rm_f) $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
echo rm -f $${locs}; \
|
||||
$(am__rm_f) $${locs}
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
-$(am__rm_f) $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
echo rm -f $${locs}; \
|
||||
$(am__rm_f) $${locs}
|
||||
arm/$(am__dirstamp):
|
||||
@$(MKDIR_P) arm
|
||||
@: > arm/$(am__dirstamp)
|
||||
@: >>arm/$(am__dirstamp)
|
||||
arm/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) arm/$(DEPDIR)
|
||||
@: > arm/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>arm/$(DEPDIR)/$(am__dirstamp)
|
||||
arm/arm_init.lo: arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp)
|
||||
arm/filter_neon.lo: arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp)
|
||||
arm/filter_neon_intrinsics.lo: arm/$(am__dirstamp) \
|
||||
arm/$(DEPDIR)/$(am__dirstamp)
|
||||
arm/palette_neon_intrinsics.lo: arm/$(am__dirstamp) \
|
||||
arm/$(DEPDIR)/$(am__dirstamp)
|
||||
mips/$(am__dirstamp):
|
||||
@$(MKDIR_P) mips
|
||||
@: > mips/$(am__dirstamp)
|
||||
@: >>mips/$(am__dirstamp)
|
||||
mips/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) mips/$(DEPDIR)
|
||||
@: > mips/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>mips/$(DEPDIR)/$(am__dirstamp)
|
||||
mips/mips_init.lo: mips/$(am__dirstamp) mips/$(DEPDIR)/$(am__dirstamp)
|
||||
mips/filter_msa_intrinsics.lo: mips/$(am__dirstamp) \
|
||||
mips/$(DEPDIR)/$(am__dirstamp)
|
||||
@ -1067,20 +1077,20 @@ mips/filter_mmi_inline_assembly.lo: mips/$(am__dirstamp) \
|
||||
mips/$(DEPDIR)/$(am__dirstamp)
|
||||
intel/$(am__dirstamp):
|
||||
@$(MKDIR_P) intel
|
||||
@: > intel/$(am__dirstamp)
|
||||
@: >>intel/$(am__dirstamp)
|
||||
intel/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) intel/$(DEPDIR)
|
||||
@: > intel/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>intel/$(DEPDIR)/$(am__dirstamp)
|
||||
intel/intel_init.lo: intel/$(am__dirstamp) \
|
||||
intel/$(DEPDIR)/$(am__dirstamp)
|
||||
intel/filter_sse2_intrinsics.lo: intel/$(am__dirstamp) \
|
||||
intel/$(DEPDIR)/$(am__dirstamp)
|
||||
powerpc/$(am__dirstamp):
|
||||
@$(MKDIR_P) powerpc
|
||||
@: > powerpc/$(am__dirstamp)
|
||||
@: >>powerpc/$(am__dirstamp)
|
||||
powerpc/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) powerpc/$(DEPDIR)
|
||||
@: > powerpc/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>powerpc/$(DEPDIR)/$(am__dirstamp)
|
||||
powerpc/powerpc_init.lo: powerpc/$(am__dirstamp) \
|
||||
powerpc/$(DEPDIR)/$(am__dirstamp)
|
||||
powerpc/filter_vsx_intrinsics.lo: powerpc/$(am__dirstamp) \
|
||||
@ -1090,10 +1100,10 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_O
|
||||
$(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK) -rpath $(libdir) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD) $(LIBS)
|
||||
loongarch/$(am__dirstamp):
|
||||
@$(MKDIR_P) loongarch
|
||||
@: > loongarch/$(am__dirstamp)
|
||||
@: >>loongarch/$(am__dirstamp)
|
||||
loongarch/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) loongarch/$(DEPDIR)
|
||||
@: > loongarch/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>loongarch/$(DEPDIR)/$(am__dirstamp)
|
||||
loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-loongarch_lsx_init.lo: \
|
||||
loongarch/$(am__dirstamp) loongarch/$(DEPDIR)/$(am__dirstamp)
|
||||
loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo: \
|
||||
@ -1101,12 +1111,25 @@ loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo: \
|
||||
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LINK) $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_rpath) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_LIBADD) $(LIBS)
|
||||
riscv/$(am__dirstamp):
|
||||
@$(MKDIR_P) riscv
|
||||
@: >>riscv/$(am__dirstamp)
|
||||
riscv/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) riscv/$(DEPDIR)
|
||||
@: >>riscv/$(DEPDIR)/$(am__dirstamp)
|
||||
riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo: \
|
||||
riscv/$(am__dirstamp) riscv/$(DEPDIR)/$(am__dirstamp)
|
||||
riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo: \
|
||||
riscv/$(am__dirstamp) riscv/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_LINK) $(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_rpath) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_LIBADD) $(LIBS)
|
||||
contrib/tools/$(am__dirstamp):
|
||||
@$(MKDIR_P) contrib/tools
|
||||
@: > contrib/tools/$(am__dirstamp)
|
||||
@: >>contrib/tools/$(am__dirstamp)
|
||||
contrib/tools/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) contrib/tools/$(DEPDIR)
|
||||
@: > contrib/tools/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>contrib/tools/$(DEPDIR)/$(am__dirstamp)
|
||||
contrib/tools/png-fix-itxt.$(OBJEXT): contrib/tools/$(am__dirstamp) \
|
||||
contrib/tools/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
@ -1127,10 +1150,10 @@ pngfix$(EXEEXT): $(pngfix_OBJECTS) $(pngfix_DEPENDENCIES) $(EXTRA_pngfix_DEPENDE
|
||||
$(AM_V_CCLD)$(LINK) $(pngfix_OBJECTS) $(pngfix_LDADD) $(LIBS)
|
||||
contrib/libtests/$(am__dirstamp):
|
||||
@$(MKDIR_P) contrib/libtests
|
||||
@: > contrib/libtests/$(am__dirstamp)
|
||||
@: >>contrib/libtests/$(am__dirstamp)
|
||||
contrib/libtests/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) contrib/libtests/$(DEPDIR)
|
||||
@: > contrib/libtests/$(DEPDIR)/$(am__dirstamp)
|
||||
@: >>contrib/libtests/$(DEPDIR)/$(am__dirstamp)
|
||||
contrib/libtests/pngimage.$(OBJEXT): contrib/libtests/$(am__dirstamp) \
|
||||
contrib/libtests/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
@ -1216,6 +1239,8 @@ mostlyclean-compile:
|
||||
-rm -f mips/*.lo
|
||||
-rm -f powerpc/*.$(OBJEXT)
|
||||
-rm -f powerpc/*.lo
|
||||
-rm -f riscv/*.$(OBJEXT)
|
||||
-rm -f riscv/*.lo
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
@ -1237,7 +1262,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwtran.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngwutil.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/arm_init.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/filter_neon.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/filter_neon_intrinsics.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/palette_neon_intrinsics.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngimage.Po@am__quote@ # am--include-marker
|
||||
@ -1257,37 +1281,15 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@mips/$(DEPDIR)/mips_init.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@powerpc/$(DEPDIR)/powerpc_init.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
@: >>$@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.S.o:
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
.S.obj:
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.S.lo:
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@ -1326,6 +1328,20 @@ loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo: loo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS) $(CFLAGS) -c -o loongarch/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la-filter_lsx_intrinsics.lo `test -f 'loongarch/filter_lsx_intrinsics.c' || echo '$(srcdir)/'`loongarch/filter_lsx_intrinsics.c
|
||||
|
||||
riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo: riscv/riscv_init.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS) $(CFLAGS) -MT riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo -MD -MP -MF riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Tpo -c -o riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo `test -f 'riscv/riscv_init.c' || echo '$(srcdir)/'`riscv/riscv_init.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Tpo riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='riscv/riscv_init.c' object='riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS) $(CFLAGS) -c -o riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.lo `test -f 'riscv/riscv_init.c' || echo '$(srcdir)/'`riscv/riscv_init.c
|
||||
|
||||
riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo: riscv/filter_rvv_intrinsics.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS) $(CFLAGS) -MT riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo -MD -MP -MF riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Tpo -c -o riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo `test -f 'riscv/filter_rvv_intrinsics.c' || echo '$(srcdir)/'`riscv/filter_rvv_intrinsics.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Tpo riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='riscv/filter_rvv_intrinsics.c' object='riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la_CFLAGS) $(CFLAGS) -c -o riscv/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.lo `test -f 'riscv/filter_rvv_intrinsics.c' || echo '$(srcdir)/'`riscv/filter_rvv_intrinsics.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
@ -1336,6 +1352,7 @@ clean-libtool:
|
||||
-rm -rf loongarch/.libs loongarch/_libs
|
||||
-rm -rf mips/.libs mips/_libs
|
||||
-rm -rf powerpc/.libs powerpc/_libs
|
||||
-rm -rf riscv/.libs riscv/_libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
@ -1561,7 +1578,6 @@ distclean-tags:
|
||||
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
|
||||
am--force-recheck:
|
||||
@:
|
||||
|
||||
$(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
@$(am__set_TESTS_bases); \
|
||||
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
|
||||
@ -1637,10 +1653,37 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
result_count $$1 "XPASS:" $$xpass "$$red"; \
|
||||
result_count $$1 "ERROR:" $$error "$$mgn"; \
|
||||
}; \
|
||||
output_system_information () \
|
||||
{ \
|
||||
echo; \
|
||||
{ uname -a | $(AWK) '{ \
|
||||
printf "System information (uname -a):"; \
|
||||
for (i = 1; i < NF; ++i) \
|
||||
{ \
|
||||
if (i != 2) \
|
||||
printf " %s", $$i; \
|
||||
} \
|
||||
printf "\n"; \
|
||||
}'; } 2>&1; \
|
||||
if test -r /etc/os-release; then \
|
||||
echo "Distribution information (/etc/os-release):"; \
|
||||
sed 8q /etc/os-release; \
|
||||
elif test -r /etc/issue; then \
|
||||
echo "Distribution information (/etc/issue):"; \
|
||||
cat /etc/issue; \
|
||||
fi; \
|
||||
}; \
|
||||
please_report () \
|
||||
{ \
|
||||
echo "Some test(s) failed. Please report this to $(PACKAGE_BUGREPORT),"; \
|
||||
echo "together with the test-suite.log file (gzipped) and your system"; \
|
||||
echo "information. Thanks."; \
|
||||
}; \
|
||||
{ \
|
||||
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
|
||||
$(am__rst_title); \
|
||||
create_testsuite_report --no-color; \
|
||||
output_system_information; \
|
||||
echo; \
|
||||
echo ".. contents:: :depth: 2"; \
|
||||
echo; \
|
||||
@ -1660,26 +1703,25 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
create_testsuite_report --maybe-color; \
|
||||
echo "$$col$$br$$std"; \
|
||||
if $$success; then :; else \
|
||||
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
|
||||
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG) for debugging.$${std}";\
|
||||
if test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
|
||||
please_report | sed -e "s/^/$${col}/" -e s/'$$'/"$${std}"/; \
|
||||
fi; \
|
||||
echo "$$col$$br$$std"; \
|
||||
fi; \
|
||||
$$success || exit 1
|
||||
|
||||
check-TESTS: $(check_PROGRAMS)
|
||||
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
|
||||
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@$(am__rm_f) $(RECHECK_LOGS)
|
||||
@$(am__rm_f) $(RECHECK_LOGS:.log=.trs)
|
||||
@$(am__rm_f) $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
log_list=`for i in $$bases; do echo $$i.log; done`; \
|
||||
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
|
||||
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
|
||||
log_list=`echo $$log_list`; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
|
||||
exit $$?;
|
||||
recheck: all $(check_PROGRAMS)
|
||||
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
@$(am__rm_f) $(TEST_SUITE_LOG)
|
||||
@set +e; $(am__set_TESTS_bases); \
|
||||
bases=`for i in $$bases; do echo $$i; done \
|
||||
| $(am__list_recheck_tests)` || exit 1; \
|
||||
@ -1927,12 +1969,13 @@ tests/pngimage-full.log: tests/pngimage-full
|
||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
$(AM_V_at)$(MKDIR_P) "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
@ -1980,6 +2023,10 @@ dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip3: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
@ -2020,9 +2067,11 @@ dist dist-all:
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.bz3*) \
|
||||
bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
@ -2030,7 +2079,7 @@ distcheck: dist
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
|
||||
eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
*.tar.zst*) \
|
||||
@ -2138,36 +2187,38 @@ install-strip:
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
|
||||
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
|
||||
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
|
||||
-$(am__rm_f) $(TEST_LOGS)
|
||||
-$(am__rm_f) $(TEST_LOGS:.log=.trs)
|
||||
-$(am__rm_f) $(TEST_SUITE_LOG)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
-$(am__rm_f) $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-rm -f arm/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f arm/$(am__dirstamp)
|
||||
-rm -f contrib/libtests/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f contrib/libtests/$(am__dirstamp)
|
||||
-rm -f contrib/tools/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f contrib/tools/$(am__dirstamp)
|
||||
-rm -f intel/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f intel/$(am__dirstamp)
|
||||
-rm -f loongarch/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f loongarch/$(am__dirstamp)
|
||||
-rm -f mips/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f mips/$(am__dirstamp)
|
||||
-rm -f powerpc/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f powerpc/$(am__dirstamp)
|
||||
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-$(am__rm_f) arm/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) arm/$(am__dirstamp)
|
||||
-$(am__rm_f) contrib/libtests/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) contrib/libtests/$(am__dirstamp)
|
||||
-$(am__rm_f) contrib/tools/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) contrib/tools/$(am__dirstamp)
|
||||
-$(am__rm_f) intel/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) intel/$(am__dirstamp)
|
||||
-$(am__rm_f) loongarch/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) loongarch/$(am__dirstamp)
|
||||
-$(am__rm_f) mips/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) mips/$(am__dirstamp)
|
||||
-$(am__rm_f) powerpc/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) powerpc/$(am__dirstamp)
|
||||
-$(am__rm_f) riscv/$(DEPDIR)/$(am__dirstamp)
|
||||
-$(am__rm_f) riscv/$(am__dirstamp)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-$(am__rm_f) $(BUILT_SOURCES)
|
||||
-$(am__rm_f) $(MAINTAINERCLEANFILES)
|
||||
@DO_INSTALL_LIBPNG_CONFIG_FALSE@@DO_INSTALL_LINKS_FALSE@install-exec-hook:
|
||||
@DO_INSTALL_LIBPNG_PC_FALSE@@DO_INSTALL_LINKS_FALSE@install-data-hook:
|
||||
@DO_INSTALL_LIBPNG_CONFIG_FALSE@@DO_INSTALL_LIBPNG_PC_FALSE@@DO_INSTALL_LINKS_FALSE@uninstall-hook:
|
||||
@ -2179,7 +2230,7 @@ clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f ./$(DEPDIR)/png.Plo
|
||||
-rm -f ./$(DEPDIR)/png.Plo
|
||||
-rm -f ./$(DEPDIR)/pngerror.Plo
|
||||
-rm -f ./$(DEPDIR)/pngget.Plo
|
||||
-rm -f ./$(DEPDIR)/pngmem.Plo
|
||||
@ -2196,7 +2247,6 @@ distclean: distclean-am
|
||||
-rm -f ./$(DEPDIR)/pngwtran.Plo
|
||||
-rm -f ./$(DEPDIR)/pngwutil.Plo
|
||||
-rm -f arm/$(DEPDIR)/arm_init.Plo
|
||||
-rm -f arm/$(DEPDIR)/filter_neon.Plo
|
||||
-rm -f arm/$(DEPDIR)/filter_neon_intrinsics.Plo
|
||||
-rm -f arm/$(DEPDIR)/palette_neon_intrinsics.Plo
|
||||
-rm -f contrib/libtests/$(DEPDIR)/pngimage.Po
|
||||
@ -2216,6 +2266,8 @@ distclean: distclean-am
|
||||
-rm -f mips/$(DEPDIR)/mips_init.Plo
|
||||
-rm -f powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo
|
||||
-rm -f powerpc/$(DEPDIR)/powerpc_init.Plo
|
||||
-rm -f riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo
|
||||
-rm -f riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
@ -2267,7 +2319,7 @@ installcheck-am:
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f ./$(DEPDIR)/png.Plo
|
||||
-rm -f ./$(DEPDIR)/png.Plo
|
||||
-rm -f ./$(DEPDIR)/pngerror.Plo
|
||||
-rm -f ./$(DEPDIR)/pngget.Plo
|
||||
-rm -f ./$(DEPDIR)/pngmem.Plo
|
||||
@ -2284,7 +2336,6 @@ maintainer-clean: maintainer-clean-am
|
||||
-rm -f ./$(DEPDIR)/pngwtran.Plo
|
||||
-rm -f ./$(DEPDIR)/pngwutil.Plo
|
||||
-rm -f arm/$(DEPDIR)/arm_init.Plo
|
||||
-rm -f arm/$(DEPDIR)/filter_neon.Plo
|
||||
-rm -f arm/$(DEPDIR)/filter_neon_intrinsics.Plo
|
||||
-rm -f arm/$(DEPDIR)/palette_neon_intrinsics.Plo
|
||||
-rm -f contrib/libtests/$(DEPDIR)/pngimage.Po
|
||||
@ -2304,6 +2355,8 @@ maintainer-clean: maintainer-clean-am
|
||||
-rm -f mips/$(DEPDIR)/mips_init.Plo
|
||||
-rm -f powerpc/$(DEPDIR)/filter_vsx_intrinsics.Plo
|
||||
-rm -f powerpc/$(DEPDIR)/powerpc_init.Plo
|
||||
-rm -f riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-filter_rvv_intrinsics.Plo
|
||||
-rm -f riscv/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@rvv_la-riscv_init.Plo
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
@ -2336,15 +2389,15 @@ uninstall-man: uninstall-man3 uninstall-man5
|
||||
clean-checkPROGRAMS clean-cscope clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
|
||||
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
|
||||
dist-zip dist-zstd distcheck distclean distclean-compile \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binPROGRAMS install-binSCRIPTS install-data \
|
||||
install-data-am install-data-hook install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-exec-hook install-html \
|
||||
install-html-am install-info install-info-am \
|
||||
dist-bzip3 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip dist-zstd distcheck distclean \
|
||||
distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binPROGRAMS install-binSCRIPTS \
|
||||
install-data install-data-am install-data-hook install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-exec-hook \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-man3 install-man5 \
|
||||
install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \
|
||||
install-pkgconfigDATA install-pkgincludeHEADERS install-ps \
|
||||
@ -2548,3 +2601,10 @@ all-am: $(check_PROGRAMS)
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
||||
# Tell GNU make to disable its built-in pattern rules.
|
||||
%:: %,v
|
||||
%:: RCS/%,v
|
||||
%:: RCS/%
|
||||
%:: s.%
|
||||
%:: SCCS/s.%
|
||||
|
8
README
8
README
@ -1,5 +1,5 @@
|
||||
README for libpng version 1.6.43
|
||||
================================
|
||||
README for libpng version 1.6.51.git
|
||||
====================================
|
||||
|
||||
See the note about version numbers near the top of `png.h`.
|
||||
See `INSTALL` for instructions on how to install libpng.
|
||||
@ -147,6 +147,7 @@ Files included in this distribution
|
||||
loongarch/ => Optimized code for LoongArch LSX
|
||||
mips/ => Optimized code for MIPS MSA and MIPS MMI
|
||||
powerpc/ => Optimized code for PowerPC VSX
|
||||
riscv/ => Optimized code for the RISC-V platform
|
||||
ci/ => Scripts for continuous integration
|
||||
contrib/ => External contributions
|
||||
arm-neon/ => Optimized code for the ARM-NEON platform
|
||||
@ -157,13 +158,12 @@ Files included in this distribution
|
||||
"PNG: The Definitive Guide" by Greg Roelofs,
|
||||
O'Reilly, 1999
|
||||
libtests/ => Test programs
|
||||
oss-fuzz/ => Files used by the OSS-Fuzz project for fuzz-testing
|
||||
libpng
|
||||
pngexif/ => Program to inspect the EXIF information in PNG files
|
||||
pngminim/ => Minimal decoder, encoder, and progressive decoder
|
||||
programs demonstrating the use of pngusr.dfa
|
||||
pngminus/ => Simple pnm2png and png2pnm programs
|
||||
pngsuite/ => Test images
|
||||
riscv-rvv/ => Optimized code for the RISC-V Vector platform
|
||||
testpngs/ => Test images
|
||||
tools/ => Various tools
|
||||
visupng/ => VisualPng, a Windows viewer for PNG images
|
||||
|
43
TODO
43
TODO
@ -1,23 +1,22 @@
|
||||
TODO - list of things to do for libpng:
|
||||
TODO list for libpng
|
||||
--------------------
|
||||
|
||||
* Fix all defects (duh!)
|
||||
* Better C++ wrapper / full C++ implementation (?)
|
||||
* Fix the problems with C++ and 'extern "C"'.
|
||||
* cHRM transformation.
|
||||
* Palette creation.
|
||||
* "grayscale->palette" transformation and "palette->grayscale" detection.
|
||||
* Improved dithering.
|
||||
* Multi-lingual error and warning message support.
|
||||
* Complete sRGB transformation. (Currently it simply uses gamma=0.45455.)
|
||||
* Man pages for function calls.
|
||||
* Better documentation.
|
||||
* Better filter selection
|
||||
(e.g., counting huffman bits/precompression; filter inertia; filter costs).
|
||||
* Histogram creation.
|
||||
* Text conversion between different code pages (e.g., Latin-1 -> Mac).
|
||||
* Avoid building gamma tables whenever possible.
|
||||
* Greater precision in changing to linear gamma for compositing against
|
||||
background, and in doing rgb-to-gray transformations.
|
||||
* Investigate pre-incremented loop counters and other loop constructions.
|
||||
* Interpolated method of handling interlacing.
|
||||
* More validations for libpng transformations.
|
||||
* Fix all defects (duh!)
|
||||
* cHRM transformation.
|
||||
* Palette creation.
|
||||
* "grayscale->palette" transformation and "palette->grayscale" detection.
|
||||
* Improved dithering.
|
||||
* Multi-lingual error and warning message support.
|
||||
* Complete sRGB transformation. (Currently it simply uses gamma=0.45455.)
|
||||
* Man pages for function calls.
|
||||
* Better documentation.
|
||||
* Better filter selection
|
||||
(e.g., counting huffman bits/precompression; filter inertia; filter costs).
|
||||
* Histogram creation.
|
||||
* Text conversion between different code pages (e.g., Latin-1 to Mac).
|
||||
* Avoid building gamma tables whenever possible.
|
||||
* Greater precision in changing to linear gamma for compositing against
|
||||
background, and in doing rgb-to-gray transformations.
|
||||
* Investigate pre-incremented loop counters and other loop constructions.
|
||||
* Interpolated method of handling interlacing.
|
||||
* More validations for libpng transformations.
|
||||
|
431
aclocal.m4
vendored
431
aclocal.m4
vendored
@ -1,6 +1,6 @@
|
||||
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.18.1 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.16'
|
||||
[am__api_version='1.18'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.16.5], [],
|
||||
m4_if([$1], [1.18.1], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.16.5])dnl
|
||||
[AM_AUTOMAKE_VERSION([1.18.1])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# Figure out how to run the assembler. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -161,7 +161,7 @@ AC_CONFIG_COMMANDS_PRE(
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -293,7 +293,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# When given -MP, icc 7.0 and 7.1 complain thus:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
@ -352,7 +352,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -420,7 +420,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -520,8 +520,9 @@ AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])],
|
||||
[_AM_PROG_TAR([ustar])])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES([CC])],
|
||||
@ -554,7 +555,7 @@ if test -z "$CSCOPE"; then
|
||||
fi
|
||||
AC_SUBST([CSCOPE])
|
||||
|
||||
AC_REQUIRE([AM_SILENT_RULES])dnl
|
||||
AC_REQUIRE([_AM_SILENT_RULES])dnl
|
||||
dnl The testsuite driver may need to know about EXEEXT, so add the
|
||||
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
||||
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
||||
@ -562,47 +563,9 @@ AC_CONFIG_COMMANDS_PRE(dnl
|
||||
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
||||
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
||||
|
||||
# POSIX will say in a future version that running "rm -f" with no argument
|
||||
# is OK; and we want to be able to make that assumption in our Makefile
|
||||
# recipes. So use an aggressive probe to check that the usage we want is
|
||||
# actually supported "in the wild" to an acceptable degree.
|
||||
# See automake bug#10828.
|
||||
# To make any issue more visible, cause the running configure to be aborted
|
||||
# by default if the 'rm' program in use doesn't match our expectations; the
|
||||
# user can still override this though.
|
||||
if rm -f && rm -fr && rm -rf; then : OK; else
|
||||
cat >&2 <<'END'
|
||||
Oops!
|
||||
AC_REQUIRE([_AM_PROG_RM_F])
|
||||
AC_REQUIRE([_AM_PROG_XARGS_N])
|
||||
|
||||
Your 'rm' program seems unable to run without file operands specified
|
||||
on the command line, even when the '-f' option is present. This is contrary
|
||||
to the behaviour of most rm programs out there, and not conforming with
|
||||
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
||||
|
||||
Please tell bug-automake@gnu.org about your system, including the value
|
||||
of your $PATH and any error possibly output before this message. This
|
||||
can help us improve future automake versions.
|
||||
|
||||
END
|
||||
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
||||
echo 'Configuration will proceed anyway, since you have set the' >&2
|
||||
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
||||
echo >&2
|
||||
else
|
||||
cat >&2 <<'END'
|
||||
Aborting the configuration process, to ensure you take notice of the issue.
|
||||
|
||||
You can download and install GNU coreutils to get an 'rm' implementation
|
||||
that behaves properly: <https://www.gnu.org/software/coreutils/>.
|
||||
|
||||
If you want to complete the configuration process using your problematic
|
||||
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
||||
to "yes", and re-run configure.
|
||||
|
||||
END
|
||||
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
||||
fi
|
||||
fi
|
||||
dnl The trailing newline in this macro's definition is deliberate, for
|
||||
dnl backward compatibility and to allow trailing 'dnl'-style comments
|
||||
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
|
||||
@ -635,7 +598,7 @@ for _am_header in $config_headers :; do
|
||||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -656,7 +619,7 @@ if test x"${install_sh+set}" != xset; then
|
||||
fi
|
||||
AC_SUBST([install_sh])])
|
||||
|
||||
# Copyright (C) 2003-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -678,7 +641,7 @@ AC_SUBST([am__leading_dot])])
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -713,7 +676,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -756,7 +719,7 @@ AC_SUBST([am__quote])])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -790,7 +753,7 @@ fi
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -819,7 +782,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -851,7 +814,10 @@ AC_CACHE_CHECK(
|
||||
break
|
||||
fi
|
||||
done
|
||||
rm -f core conftest*
|
||||
# aligned with autoconf, so not including core; see bug#72225.
|
||||
rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
|
||||
conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
|
||||
conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
|
||||
unset am_i])
|
||||
if test "$am_cv_prog_cc_c_o" != yes; then
|
||||
# Losing compiler, so override with the script.
|
||||
@ -866,7 +832,23 @@ AC_LANG_POP([C])])
|
||||
# For backward compatibility.
|
||||
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
||||
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2022-2025 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_PROG_RM_F
|
||||
# ---------------
|
||||
# Check whether 'rm -f' without any arguments works.
|
||||
# https://bugs.gnu.org/10828
|
||||
AC_DEFUN([_AM_PROG_RM_F],
|
||||
[am__rm_f_notfound=
|
||||
AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
|
||||
AC_SUBST(am__rm_f_notfound)
|
||||
])
|
||||
|
||||
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -885,26 +867,181 @@ AC_DEFUN([AM_RUN_LOG],
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2025 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_SLEEP_FRACTIONAL_SECONDS
|
||||
# ----------------------------
|
||||
AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
|
||||
AC_CACHE_CHECK([whether sleep supports fractional seconds],
|
||||
am_cv_sleep_fractional_seconds, [dnl
|
||||
AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
|
||||
[am_cv_sleep_fractional_seconds=no])
|
||||
])])
|
||||
|
||||
# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
|
||||
# -----------------------------------
|
||||
# Determine the filesystem's resolution for file modification
|
||||
# timestamps. The coarsest we know of is FAT, with a resolution
|
||||
# of only two seconds, even with the most recent "exFAT" extensions.
|
||||
# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one
|
||||
# nanosecond, matching clock_gettime. However, it is probably not
|
||||
# possible to delay execution of a shell script for less than one
|
||||
# millisecond, due to process creation overhead and scheduling
|
||||
# granularity, so we don't check for anything finer than that. (See below.)
|
||||
AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
|
||||
AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
|
||||
AC_CACHE_CHECK([filesystem timestamp resolution],
|
||||
am_cv_filesystem_timestamp_resolution, [dnl
|
||||
# Default to the worst case.
|
||||
am_cv_filesystem_timestamp_resolution=2
|
||||
|
||||
# Only try to go finer than 1 sec if sleep can do it.
|
||||
# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
|
||||
# - 1 sec is not much of a win compared to 2 sec, and
|
||||
# - it takes 2 seconds to perform the test whether 1 sec works.
|
||||
#
|
||||
# Instead, just use the default 2s on platforms that have 1s resolution,
|
||||
# accept the extra 1s delay when using $sleep in the Automake tests, in
|
||||
# exchange for not incurring the 2s delay for running the test for all
|
||||
# packages.
|
||||
#
|
||||
am_try_resolutions=
|
||||
if test "$am_cv_sleep_fractional_seconds" = yes; then
|
||||
# Even a millisecond often causes a bunch of false positives,
|
||||
# so just try a hundredth of a second. The time saved between .001 and
|
||||
# .01 is not terribly consequential.
|
||||
am_try_resolutions="0.01 0.1 $am_try_resolutions"
|
||||
fi
|
||||
|
||||
# In order to catch current-generation FAT out, we must *modify* files
|
||||
# that already exist; the *creation* timestamp is finer. Use names
|
||||
# that make ls -t sort them differently when they have equal
|
||||
# timestamps than when they have distinct timestamps, keeping
|
||||
# in mind that ls -t prints the *newest* file first.
|
||||
rm -f conftest.ts?
|
||||
: > conftest.ts1
|
||||
: > conftest.ts2
|
||||
: > conftest.ts3
|
||||
|
||||
# Make sure ls -t actually works. Do 'set' in a subshell so we don't
|
||||
# clobber the current shell's arguments. (Outer-level square brackets
|
||||
# are removed by m4; they're present so that m4 does not expand
|
||||
# <dollar><star>; be careful, easy to get confused.)
|
||||
if (
|
||||
set X `[ls -t conftest.ts[12]]` &&
|
||||
{
|
||||
test "$[]*" != "X conftest.ts1 conftest.ts2" ||
|
||||
test "$[]*" != "X conftest.ts2 conftest.ts1";
|
||||
}
|
||||
); then :; else
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
_AS_ECHO_UNQUOTED(
|
||||
["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""],
|
||||
[AS_MESSAGE_LOG_FD])
|
||||
AC_MSG_FAILURE([ls -t produces unexpected output.
|
||||
Make sure there is not a broken ls alias in your environment.])
|
||||
fi
|
||||
|
||||
for am_try_res in $am_try_resolutions; do
|
||||
# Any one fine-grained sleep might happen to cross the boundary
|
||||
# between two values of a coarser actual resolution, but if we do
|
||||
# two fine-grained sleeps in a row, at least one of them will fall
|
||||
# entirely within a coarse interval.
|
||||
echo alpha > conftest.ts1
|
||||
sleep $am_try_res
|
||||
echo beta > conftest.ts2
|
||||
sleep $am_try_res
|
||||
echo gamma > conftest.ts3
|
||||
|
||||
# We assume that 'ls -t' will make use of high-resolution
|
||||
# timestamps if the operating system supports them at all.
|
||||
if (set X `ls -t conftest.ts?` &&
|
||||
test "$[]2" = conftest.ts3 &&
|
||||
test "$[]3" = conftest.ts2 &&
|
||||
test "$[]4" = conftest.ts1); then
|
||||
#
|
||||
# Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
|
||||
# because we don't need to test make.
|
||||
make_ok=true
|
||||
if test $am_try_res != 1; then
|
||||
# But if we've succeeded so far with a subsecond resolution, we
|
||||
# have one more thing to check: make. It can happen that
|
||||
# everything else supports the subsecond mtimes, but make doesn't;
|
||||
# notably on macOS, which ships make 3.81 from 2006 (the last one
|
||||
# released under GPLv2). https://bugs.gnu.org/68808
|
||||
#
|
||||
# We test $MAKE if it is defined in the environment, else "make".
|
||||
# It might get overridden later, but our hope is that in practice
|
||||
# it does not matter: it is the system "make" which is (by far)
|
||||
# the most likely to be broken, whereas if the user overrides it,
|
||||
# probably they did so with a better, or at least not worse, make.
|
||||
# https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
|
||||
#
|
||||
# Create a Makefile (real tab character here):
|
||||
rm -f conftest.mk
|
||||
echo 'conftest.ts1: conftest.ts2' >conftest.mk
|
||||
echo ' touch conftest.ts2' >>conftest.mk
|
||||
#
|
||||
# Now, running
|
||||
# touch conftest.ts1; touch conftest.ts2; make
|
||||
# should touch ts1 because ts2 is newer. This could happen by luck,
|
||||
# but most often, it will fail if make's support is insufficient. So
|
||||
# test for several consecutive successes.
|
||||
#
|
||||
# (We reuse conftest.ts[12] because we still want to modify existing
|
||||
# files, not create new ones, per above.)
|
||||
n=0
|
||||
make=${MAKE-make}
|
||||
until test $n -eq 3; do
|
||||
echo one > conftest.ts1
|
||||
sleep $am_try_res
|
||||
echo two > conftest.ts2 # ts2 should now be newer than ts1
|
||||
if $make -f conftest.mk | grep 'up to date' >/dev/null; then
|
||||
make_ok=false
|
||||
break # out of $n loop
|
||||
fi
|
||||
n=`expr $n + 1`
|
||||
done
|
||||
fi
|
||||
#
|
||||
if $make_ok; then
|
||||
# Everything we know to check worked out, so call this resolution good.
|
||||
am_cv_filesystem_timestamp_resolution=$am_try_res
|
||||
break # out of $am_try_res loop
|
||||
fi
|
||||
# Otherwise, we'll go on to check the next resolution.
|
||||
fi
|
||||
done
|
||||
rm -f conftest.ts?
|
||||
# (end _am_filesystem_timestamp_resolution)
|
||||
])])
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION])
|
||||
# This check should not be cached, as it may vary across builds of
|
||||
# different projects.
|
||||
AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Reject unsafe characters in $srcdir or the absolute working directory
|
||||
# name. Accept space and tab only in the latter.
|
||||
am_lf='
|
||||
'
|
||||
case `pwd` in
|
||||
*[[\\\"\#\$\&\'\`$am_lf]]*)
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([unsafe absolute working directory name]);;
|
||||
esac
|
||||
case $srcdir in
|
||||
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
|
||||
esac
|
||||
|
||||
@ -913,49 +1050,40 @@ esac
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
am_has_slept=no
|
||||
for am_try in 1 2; do
|
||||
echo "timestamp, slept: $am_has_slept" > conftest.file
|
||||
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t "$srcdir/configure" conftest.file`
|
||||
fi
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
am_build_env_is_sane=no
|
||||
am_has_slept=no
|
||||
rm -f conftest.file
|
||||
for am_try in 1 2; do
|
||||
echo "timestamp, slept: $am_has_slept" > conftest.file
|
||||
if (
|
||||
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
||||
if test "$[]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t "$srcdir/configure" conftest.file`
|
||||
fi
|
||||
test "$[]2" = conftest.file
|
||||
); then
|
||||
am_build_env_is_sane=yes
|
||||
break
|
||||
fi
|
||||
# Just in case.
|
||||
sleep "$am_cv_filesystem_timestamp_resolution"
|
||||
am_has_slept=yes
|
||||
done
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
if test "$[2]" = conftest.file || test $am_try -eq 2; then
|
||||
break
|
||||
fi
|
||||
# Just in case.
|
||||
sleep 1
|
||||
am_has_slept=yes
|
||||
done
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
AC_MSG_RESULT([$am_build_env_is_sane])
|
||||
if test "$am_build_env_is_sane" = no; then
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
# If we didn't sleep, we still need to ensure time stamps of config.status and
|
||||
# generated files are strictly newer.
|
||||
am_sleep_pid=
|
||||
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
|
||||
( sleep 1 ) &
|
||||
AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
|
||||
( sleep "$am_cv_filesystem_timestamp_resolution" ) &
|
||||
am_sleep_pid=$!
|
||||
fi
|
||||
])
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[AC_MSG_CHECKING([that generated files are newer than configure])
|
||||
if test -n "$am_sleep_pid"; then
|
||||
@ -966,18 +1094,18 @@ AC_CONFIG_COMMANDS_PRE(
|
||||
rm -f conftest.file
|
||||
])
|
||||
|
||||
# Copyright (C) 2009-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2009-2025 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_SILENT_RULES([DEFAULT])
|
||||
# --------------------------
|
||||
# Enable less verbose build rules; with the default set to DEFAULT
|
||||
# ("yes" being less verbose, "no" or empty being verbose).
|
||||
AC_DEFUN([AM_SILENT_RULES],
|
||||
[AC_ARG_ENABLE([silent-rules], [dnl
|
||||
# _AM_SILENT_RULES
|
||||
# ----------------
|
||||
# Enable less verbose build rules support.
|
||||
AC_DEFUN([_AM_SILENT_RULES],
|
||||
[AM_DEFAULT_VERBOSITY=1
|
||||
AC_ARG_ENABLE([silent-rules], [dnl
|
||||
AS_HELP_STRING(
|
||||
[--enable-silent-rules],
|
||||
[less verbose build output (undo: "make V=1")])
|
||||
@ -985,11 +1113,6 @@ AS_HELP_STRING(
|
||||
[--disable-silent-rules],
|
||||
[verbose build output (undo: "make V=0")])dnl
|
||||
])
|
||||
case $enable_silent_rules in @%:@ (((
|
||||
yes) AM_DEFAULT_VERBOSITY=0;;
|
||||
no) AM_DEFAULT_VERBOSITY=1;;
|
||||
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
|
||||
esac
|
||||
dnl
|
||||
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
|
||||
dnl do not support nested variable expansions.
|
||||
@ -1008,14 +1131,6 @@ am__doit:
|
||||
else
|
||||
am_cv_make_support_nested_variables=no
|
||||
fi])
|
||||
if test $am_cv_make_support_nested_variables = yes; then
|
||||
dnl Using '$V' instead of '$(V)' breaks IRIX make.
|
||||
AM_V='$(V)'
|
||||
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
||||
else
|
||||
AM_V=$AM_DEFAULT_VERBOSITY
|
||||
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
|
||||
fi
|
||||
AC_SUBST([AM_V])dnl
|
||||
AM_SUBST_NOTMAKE([AM_V])dnl
|
||||
AC_SUBST([AM_DEFAULT_V])dnl
|
||||
@ -1024,9 +1139,37 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
|
||||
AM_BACKSLASH='\'
|
||||
AC_SUBST([AM_BACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||
dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
|
||||
dnl to AM_SILENT_RULES to change the default value.
|
||||
AC_CONFIG_COMMANDS_PRE([dnl
|
||||
case $enable_silent_rules in @%:@ (((
|
||||
yes) AM_DEFAULT_VERBOSITY=0;;
|
||||
no) AM_DEFAULT_VERBOSITY=1;;
|
||||
esac
|
||||
if test $am_cv_make_support_nested_variables = yes; then
|
||||
dnl Using '$V' instead of '$(V)' breaks IRIX make.
|
||||
AM_V='$(V)'
|
||||
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
|
||||
else
|
||||
AM_V=$AM_DEFAULT_VERBOSITY
|
||||
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
|
||||
fi
|
||||
])dnl
|
||||
])
|
||||
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
# AM_SILENT_RULES([DEFAULT])
|
||||
# --------------------------
|
||||
# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
|
||||
# empty being verbose).
|
||||
AC_DEFUN([AM_SILENT_RULES],
|
||||
[AC_REQUIRE([_AM_SILENT_RULES])
|
||||
AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])m4_newline
|
||||
dnl We intentionally force a newline after the assignment, since a) nothing
|
||||
dnl good can come of more text following, and b) that was the behavior
|
||||
dnl before 1.17. See https://bugs.gnu.org/72267.
|
||||
])
|
||||
|
||||
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -1054,7 +1197,7 @@ fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -1073,7 +1216,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004-2025 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -1119,15 +1262,19 @@ m4_if([$1], [v7],
|
||||
am_uid=`id -u || echo unknown`
|
||||
am_gid=`id -g || echo unknown`
|
||||
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
|
||||
if test $am_uid -le $am_max_uid; then
|
||||
AC_MSG_RESULT([yes])
|
||||
if test x$am_uid = xunknown; then
|
||||
AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
|
||||
elif test $am_uid -le $am_max_uid; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
_am_tools=none
|
||||
AC_MSG_RESULT([no])
|
||||
_am_tools=none
|
||||
fi
|
||||
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
|
||||
if test $am_gid -le $am_max_gid; then
|
||||
AC_MSG_RESULT([yes])
|
||||
if test x$gm_gid = xunknown; then
|
||||
AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
|
||||
elif test $am_gid -le $am_max_gid; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
_am_tools=none
|
||||
@ -1204,6 +1351,26 @@ AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
# Copyright (C) 2022-2025 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_PROG_XARGS_N
|
||||
# ----------------
|
||||
# Check whether 'xargs -n' works. It should work everywhere, so the fallback
|
||||
# is not optimized at all as we never expect to use it.
|
||||
AC_DEFUN([_AM_PROG_XARGS_N],
|
||||
[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl
|
||||
AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
|
||||
3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])])
|
||||
AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl
|
||||
am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }'
|
||||
])dnl
|
||||
AC_SUBST(am__xargs_n)
|
||||
])
|
||||
|
||||
m4_include([scripts/autoconf/libtool.m4])
|
||||
m4_include([scripts/autoconf/ltoptions.m4])
|
||||
m4_include([scripts/autoconf/ltsugar.m4])
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* arm_init.c - NEON optimised filter functions
|
||||
*
|
||||
* Copyright (c) 2018-2022 Cosmin Truta
|
||||
@ -36,14 +35,14 @@
|
||||
#ifndef PNG_ARM_NEON_FILE
|
||||
# if defined(__aarch64__) || defined(_M_ARM64)
|
||||
/* ARM Neon is expected to be unconditionally available on ARM64. */
|
||||
# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64"
|
||||
# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64
|
||||
# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
|
||||
/* ARM Neon is expected to be available on the target CPU architecture. */
|
||||
# error "PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch"
|
||||
# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch
|
||||
# elif defined(__linux__)
|
||||
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
|
||||
# else
|
||||
# error "No support for run-time ARM Neon checking; use compile-time options"
|
||||
# error No support for run-time ARM Neon checking; use compile-time options
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -54,7 +53,7 @@ static int png_have_neon(png_structp png_ptr);
|
||||
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
||||
|
||||
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||
# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED"
|
||||
# error ALIGNED_MEMORY is required; please define PNG_ALIGNED_MEMORY_SUPPORTED
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -1,253 +1,60 @@
|
||||
|
||||
/* filter_neon.S - NEON optimised filter functions
|
||||
/* filter_neon.S - placeholder file
|
||||
*
|
||||
* Copyright (c) 2018 Cosmin Truta
|
||||
* Copyright (c) 2014,2017 Glenn Randers-Pehrson
|
||||
* Written by Mans Rullgard, 2011.
|
||||
* Copyright (c) 2024 Cosmin Truta
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*/
|
||||
|
||||
/* IMPORTANT NOTE:
|
||||
*
|
||||
* Historically, the hand-coded assembler implementation of Neon optimizations
|
||||
* in this module had not been in sync with the intrinsics-based implementation
|
||||
* in filter_neon_intrinsics.c and palette_neon_intrinsics.c, at least since
|
||||
* the introduction of riffled palette optimizations. Moreover, the assembler
|
||||
* code used to work on 32-bit ARM only, and it caused problems, even if empty,
|
||||
* on 64-bit ARM.
|
||||
*
|
||||
* All references to this module from our internal build scripts and projects
|
||||
* have been removed.
|
||||
*
|
||||
* For the external projects that might still expect this module to be present,
|
||||
* we leave this stub in place, for the remaining lifetime of libpng-1.6.x.
|
||||
* Everything should continue to function normally, as long as there are no
|
||||
* deliberate attempts to use the old hand-made assembler code. A build error
|
||||
* will be raised otherwise.
|
||||
*/
|
||||
|
||||
/* This is required to get the symbol renames, which are #defines, and the
|
||||
* definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
|
||||
*/
|
||||
#define PNG_VERSION_INFO_ONLY
|
||||
#include "../pngpriv.h"
|
||||
|
||||
#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
|
||||
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
|
||||
/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for
|
||||
* ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it
|
||||
* only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h
|
||||
* for the logic which sets PNG_USE_ARM_NEON_ASM:
|
||||
*/
|
||||
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
|
||||
|
||||
#if PNG_ARM_NEON_OPT > 0
|
||||
|
||||
#ifdef __ELF__
|
||||
# define ELF
|
||||
#if defined(__clang__)
|
||||
#define GNUC_VERSION 0 /* not gcc, although it might pretend to be */
|
||||
#elif defined(__GNUC__)
|
||||
#define GNUC_MAJOR (__GNUC__ + 0)
|
||||
#define GNUC_MINOR (__GNUC_MINOR__ + 0)
|
||||
#define GNUC_PATCHLEVEL (__GNUC_PATCHLEVEL__ + 0)
|
||||
#define GNUC_VERSION (GNUC_MAJOR * 10000 + GNUC_MINOR * 100 + GNUC_PATCHLEVEL)
|
||||
#else
|
||||
# define ELF @
|
||||
#define GNUC_VERSION 0 /* not gcc */
|
||||
#endif
|
||||
|
||||
.arch armv7-a
|
||||
.fpu neon
|
||||
#if (GNUC_VERSION > 0) && (GNUC_VERSION < 40300)
|
||||
#error "PNG_ARM_NEON is not supported with gcc versions earlier than 4.3.0"
|
||||
#elif GNUC_VERSION == 40504
|
||||
#error "PNG_ARM_NEON is not supported with gcc version 4.5.4"
|
||||
#else
|
||||
#error "Please use 'arm/*_neon_intrinsics.c' for PNG_ARM_NEON support"
|
||||
#endif
|
||||
|
||||
.macro func name, export=0
|
||||
.macro endfunc
|
||||
ELF .size \name, . - \name
|
||||
.endfunc
|
||||
.purgem endfunc
|
||||
.endm
|
||||
.text
|
||||
|
||||
/* Explicitly specifying alignment here because some versions of
|
||||
* GAS don't align code correctly. This is harmless in correctly
|
||||
* written versions of GAS.
|
||||
*/
|
||||
.align 2
|
||||
|
||||
.if \export
|
||||
.global \name
|
||||
.endif
|
||||
ELF .type \name, STT_FUNC
|
||||
.func \name
|
||||
\name:
|
||||
.endm
|
||||
|
||||
func png_read_filter_row_sub4_neon, export=1
|
||||
ldr r3, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
1:
|
||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||
vadd.u8 d0, d3, d4
|
||||
vadd.u8 d1, d0, d5
|
||||
vadd.u8 d2, d1, d6
|
||||
vadd.u8 d3, d2, d7
|
||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||
subs r3, r3, #16
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_sub3_neon, export=1
|
||||
ldr r3, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
mov r0, r1
|
||||
mov r2, #3
|
||||
mov r12, #12
|
||||
vld1.8 {q11}, [r0], r12
|
||||
1:
|
||||
vext.8 d5, d22, d23, #3
|
||||
vadd.u8 d0, d3, d22
|
||||
vext.8 d6, d22, d23, #6
|
||||
vadd.u8 d1, d0, d5
|
||||
vext.8 d7, d23, d23, #1
|
||||
vld1.8 {q11}, [r0], r12
|
||||
vst1.32 {d0[0]}, [r1,:32], r2
|
||||
vadd.u8 d2, d1, d6
|
||||
vst1.32 {d1[0]}, [r1], r2
|
||||
vadd.u8 d3, d2, d7
|
||||
vst1.32 {d2[0]}, [r1], r2
|
||||
vst1.32 {d3[0]}, [r1], r2
|
||||
subs r3, r3, #12
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_up_neon, export=1
|
||||
ldr r3, [r0, #4] @ rowbytes
|
||||
1:
|
||||
vld1.8 {q0}, [r1,:128]
|
||||
vld1.8 {q1}, [r2,:128]!
|
||||
vadd.u8 q0, q0, q1
|
||||
vst1.8 {q0}, [r1,:128]!
|
||||
subs r3, r3, #16
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_avg4_neon, export=1
|
||||
ldr r12, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
1:
|
||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
||||
vhadd.u8 d0, d3, d16
|
||||
vadd.u8 d0, d0, d4
|
||||
vhadd.u8 d1, d0, d17
|
||||
vadd.u8 d1, d1, d5
|
||||
vhadd.u8 d2, d1, d18
|
||||
vadd.u8 d2, d2, d6
|
||||
vhadd.u8 d3, d2, d19
|
||||
vadd.u8 d3, d3, d7
|
||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||
subs r12, r12, #16
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_avg3_neon, export=1
|
||||
push {r4,lr}
|
||||
ldr r12, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
mov r0, r1
|
||||
mov r4, #3
|
||||
mov lr, #12
|
||||
vld1.8 {q11}, [r0], lr
|
||||
1:
|
||||
vld1.8 {q10}, [r2], lr
|
||||
vext.8 d5, d22, d23, #3
|
||||
vhadd.u8 d0, d3, d20
|
||||
vext.8 d17, d20, d21, #3
|
||||
vadd.u8 d0, d0, d22
|
||||
vext.8 d6, d22, d23, #6
|
||||
vhadd.u8 d1, d0, d17
|
||||
vext.8 d18, d20, d21, #6
|
||||
vadd.u8 d1, d1, d5
|
||||
vext.8 d7, d23, d23, #1
|
||||
vld1.8 {q11}, [r0], lr
|
||||
vst1.32 {d0[0]}, [r1,:32], r4
|
||||
vhadd.u8 d2, d1, d18
|
||||
vst1.32 {d1[0]}, [r1], r4
|
||||
vext.8 d19, d21, d21, #1
|
||||
vadd.u8 d2, d2, d6
|
||||
vhadd.u8 d3, d2, d19
|
||||
vst1.32 {d2[0]}, [r1], r4
|
||||
vadd.u8 d3, d3, d7
|
||||
vst1.32 {d3[0]}, [r1], r4
|
||||
subs r12, r12, #12
|
||||
bgt 1b
|
||||
|
||||
pop {r4,pc}
|
||||
endfunc
|
||||
|
||||
.macro paeth rx, ra, rb, rc
|
||||
vaddl.u8 q12, \ra, \rb @ a + b
|
||||
vaddl.u8 q15, \rc, \rc @ 2*c
|
||||
vabdl.u8 q13, \rb, \rc @ pa
|
||||
vabdl.u8 q14, \ra, \rc @ pb
|
||||
vabd.u16 q15, q12, q15 @ pc
|
||||
vcle.u16 q12, q13, q14 @ pa <= pb
|
||||
vcle.u16 q13, q13, q15 @ pa <= pc
|
||||
vcle.u16 q14, q14, q15 @ pb <= pc
|
||||
vand q12, q12, q13 @ pa <= pb && pa <= pc
|
||||
vmovn.u16 d28, q14
|
||||
vmovn.u16 \rx, q12
|
||||
vbsl d28, \rb, \rc
|
||||
vbsl \rx, \ra, d28
|
||||
.endm
|
||||
|
||||
func png_read_filter_row_paeth4_neon, export=1
|
||||
ldr r12, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
vmov.i8 d20, #0
|
||||
1:
|
||||
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
||||
paeth d0, d3, d16, d20
|
||||
vadd.u8 d0, d0, d4
|
||||
paeth d1, d0, d17, d16
|
||||
vadd.u8 d1, d1, d5
|
||||
paeth d2, d1, d18, d17
|
||||
vadd.u8 d2, d2, d6
|
||||
paeth d3, d2, d19, d18
|
||||
vmov d20, d19
|
||||
vadd.u8 d3, d3, d7
|
||||
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||
subs r12, r12, #16
|
||||
bgt 1b
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
func png_read_filter_row_paeth3_neon, export=1
|
||||
push {r4,lr}
|
||||
ldr r12, [r0, #4] @ rowbytes
|
||||
vmov.i8 d3, #0
|
||||
vmov.i8 d4, #0
|
||||
mov r0, r1
|
||||
mov r4, #3
|
||||
mov lr, #12
|
||||
vld1.8 {q11}, [r0], lr
|
||||
1:
|
||||
vld1.8 {q10}, [r2], lr
|
||||
paeth d0, d3, d20, d4
|
||||
vext.8 d5, d22, d23, #3
|
||||
vadd.u8 d0, d0, d22
|
||||
vext.8 d17, d20, d21, #3
|
||||
paeth d1, d0, d17, d20
|
||||
vst1.32 {d0[0]}, [r1,:32], r4
|
||||
vext.8 d6, d22, d23, #6
|
||||
vadd.u8 d1, d1, d5
|
||||
vext.8 d18, d20, d21, #6
|
||||
paeth d2, d1, d18, d17
|
||||
vext.8 d7, d23, d23, #1
|
||||
vld1.8 {q11}, [r0], lr
|
||||
vst1.32 {d1[0]}, [r1], r4
|
||||
vadd.u8 d2, d2, d6
|
||||
vext.8 d19, d21, d21, #1
|
||||
paeth d3, d2, d19, d18
|
||||
vst1.32 {d2[0]}, [r1], r4
|
||||
vmov d4, d19
|
||||
vadd.u8 d3, d3, d7
|
||||
vst1.32 {d3[0]}, [r1], r4
|
||||
subs r12, r12, #12
|
||||
bgt 1b
|
||||
|
||||
pop {r4,pc}
|
||||
endfunc
|
||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
|
||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 */
|
||||
#endif /* READ */
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* filter_neon_intrinsics.c - NEON optimised filter functions
|
||||
*
|
||||
* Copyright (c) 2018 Cosmin Truta
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* palette_neon_intrinsics.c - NEON optimised palette expansion functions
|
||||
*
|
||||
* Copyright (c) 2018-2019 Cosmin Truta
|
||||
@ -64,7 +63,7 @@ png_do_expand_palette_rgba8_neon(png_structrp png_ptr, png_row_infop row_info,
|
||||
{
|
||||
png_uint_32 row_width = row_info->width;
|
||||
const png_uint_32 *riffled_palette =
|
||||
(const png_uint_32 *)png_ptr->riffled_palette;
|
||||
png_aligncastconst(png_const_uint_32p, png_ptr->riffled_palette);
|
||||
const png_uint_32 pixels_per_chunk = 4;
|
||||
png_uint_32 i;
|
||||
|
||||
|
25
ci/README.md
Normal file
25
ci/README.md
Normal file
@ -0,0 +1,25 @@
|
||||
Scripts for the Continuous Integration of the PNG Reference Library
|
||||
===================================================================
|
||||
|
||||
Copyright Notice
|
||||
----------------
|
||||
|
||||
Copyright (c) 2019-2025 Cosmin Truta.
|
||||
|
||||
Use, modification and distribution are subject to the MIT License.
|
||||
Please see the accompanying file `LICENSE_MIT.txt` or visit
|
||||
https://opensource.org/license/mit
|
||||
|
||||
File List
|
||||
---------
|
||||
|
||||
LICENSE_MIT.txt ==> The License file
|
||||
README.md ==> This file
|
||||
ci_lint.sh ==> Lint the source code
|
||||
ci_shellify.sh ==> Convert select definitions to shell syntax
|
||||
ci_verify_cmake.sh ==> Verify the build driven by CMakeLists.txt
|
||||
ci_verify_configure.sh ==> Verify the build driven by configure
|
||||
ci_verify_makefiles.sh ==> Verify the build driven by scripts/makefile.*
|
||||
ci_verify_version.sh ==> Verify the consistency of version definitions
|
||||
lib/ci.lib.sh ==> Shell utilities for the main ci_*.sh scripts
|
||||
targets/*/ci_env.*.sh ==> Shell environments for cross-platform testing
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
@ -61,7 +61,7 @@ function ci_lint_ci_scripts {
|
||||
}
|
||||
ci_info "## LINTING: CI scripts ##"
|
||||
ci_spawn "$CI_SHELLCHECK" --version
|
||||
find ./ci -maxdepth 1 -name "*.sh" | {
|
||||
find ./ci -name "ci_*.sh" -not -name "ci_env.*.sh" | {
|
||||
local my_file
|
||||
while IFS="" read -r my_file
|
||||
do
|
||||
@ -80,7 +80,7 @@ function ci_lint_text_files {
|
||||
}
|
||||
ci_info "## LINTING: text files ##"
|
||||
ci_spawn "$CI_EDITORCONFIG_CHECKER" --version
|
||||
ci_spawn "$CI_EDITORCONFIG_CHECKER" || {
|
||||
ci_spawn "$CI_EDITORCONFIG_CHECKER" --config .editorconfig-checker.json || {
|
||||
# Linting failed.
|
||||
return 1
|
||||
}
|
||||
@ -93,7 +93,9 @@ function ci_lint_yaml_files {
|
||||
}
|
||||
ci_info "## LINTING: YAML files ##"
|
||||
ci_spawn "$CI_YAMLLINT" --version
|
||||
find . \( -iname "*.yml" -o -iname "*.yaml" \) -not -path "./out/*" | {
|
||||
# Considering that the YAML format is an extension of the JSON format,
|
||||
# we can lint both the YAML files and the plain JSON files here.
|
||||
find . \( -iname "*.yml" -o -iname "*.yaml" -o -iname "*.json" \) -not -path "./out/*" | {
|
||||
local my_file
|
||||
while IFS="" read -r my_file
|
||||
do
|
||||
|
@ -1,92 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# shellcheck source=ci/lib/ci.lib.sh
|
||||
source "$(dirname "$0")/lib/ci.lib.sh"
|
||||
cd "$CI_TOPLEVEL_DIR"
|
||||
|
||||
function ci_shellify_c {
|
||||
# Convert C preprocessor text, specifically originating
|
||||
# from png.h, to shell scripting text.
|
||||
# Select only the easy-to-parse definitions of PNG_LIBPNG_*.
|
||||
sed -n -e '/^\# *define * PNG_LIBPNG_[^ ]* * ["0-9A-Za-z_]/ p' |
|
||||
sed -e 's/^\# *define * PNG\([^ ]*\) * \([^ ]*\)/PNG\1=\2/' \
|
||||
-e 's/=PNG\([0-9A-Za-z_]*\)/=\${PNG\1}/' \
|
||||
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||
}
|
||||
|
||||
function ci_shellify_autoconf {
|
||||
# Convert autoconf (M4) text, specifically originating
|
||||
# from configure.ac, to shell scripting text.
|
||||
# Select only the easy-to-parse definitions of PNGLIB_*.
|
||||
sed -n -e '/^ *PNGLIB_[^ ]*=[$"0-9A-Za-z_]/ p' |
|
||||
sed -e 's/^ *PNG\([0-9A-Za-z_]*\)=\([^# ]*\).*$/PNG\1=\2/' \
|
||||
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||
}
|
||||
|
||||
function ci_shellify_cmake {
|
||||
# Convert CMake lists text, specifically originating
|
||||
# from CMakeLists.txt, to shell scripting text.
|
||||
# Select only the easy-to-parse definitions of PNGLIB_*.
|
||||
sed -n -e '/^ *set *(PNGLIB_[^ ]* * [$"0-9A-Za-z_].*)/ p' |
|
||||
sed -e 's/^ *set *(PNG\([^ ]*\) * \([^() ]*\)).*$/PNG\1=\2/' \
|
||||
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||
}
|
||||
|
||||
function ci_shellify {
|
||||
local arg filename
|
||||
for arg in "$@"
|
||||
do
|
||||
test -f "$arg" || ci_err "no such file: '$arg'"
|
||||
filename="$(basename -- "$arg")"
|
||||
case "$filename" in
|
||||
( *.[ch] )
|
||||
[[ $filename == png.h ]] || {
|
||||
ci_err "unable to shellify: '$filename' (expecting: 'png.h')"
|
||||
}
|
||||
ci_shellify_c <"$arg" ;;
|
||||
( config* | *.ac )
|
||||
[[ $filename == configure.ac ]] || {
|
||||
ci_err "unable to shellify: '$filename' (expecting: 'configure.ac')"
|
||||
}
|
||||
ci_shellify_autoconf <"$arg" ;;
|
||||
( *CMake* | *cmake* | *.txt )
|
||||
[[ $filename == [Cc][Mm]ake[Ll]ists.txt ]] || {
|
||||
ci_err "unable to shellify: '$filename' (expecting: 'CMakeLists.txt')"
|
||||
}
|
||||
ci_shellify_cmake <"$arg" ;;
|
||||
( * )
|
||||
ci_err "unable to shellify: '$arg'" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $CI_SCRIPT_NAME [<options>] <files>..."
|
||||
echo "options: -?|-h|--help"
|
||||
echo "files: png.h|configure.ac|CMakeLists.txt"
|
||||
exit "${@:-0}"
|
||||
}
|
||||
|
||||
function main {
|
||||
local opt
|
||||
while getopts ":" opt
|
||||
do
|
||||
# This ain't a while-loop. It only pretends to be.
|
||||
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||
ci_err "unknown option: '$1'"
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
[[ $# -eq 0 ]] && usage 2
|
||||
# And... go!
|
||||
ci_shellify "$@"
|
||||
}
|
||||
|
||||
main "$@"
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
@ -17,12 +17,6 @@ CI_OUT_DIR="$CI_TOPLEVEL_DIR/out"
|
||||
CI_BUILD_DIR="$CI_OUT_DIR/ci_verify_cmake.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.build"
|
||||
CI_INSTALL_DIR="$CI_OUT_DIR/ci_verify_cmake.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.install"
|
||||
|
||||
# Keep the following relative paths in sync with the absolute paths.
|
||||
# We use them for the benefit of native Windows tools that might be
|
||||
# otherwise confused by the path encoding used by Bash-on-Windows.
|
||||
CI_BUILD_TO_SRC_RELDIR="../.."
|
||||
CI_BUILD_TO_INSTALL_RELDIR="../ci_verify_cmake.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.install"
|
||||
|
||||
function ci_init_build {
|
||||
# Ensure that the mandatory variables are initialized.
|
||||
CI_CMAKE="${CI_CMAKE:-cmake}"
|
||||
@ -70,6 +64,7 @@ function ci_trace_build {
|
||||
ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'"
|
||||
ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'"
|
||||
ci_info "environment option: \$CI_FORCE: '$CI_FORCE'"
|
||||
ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'"
|
||||
ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'"
|
||||
ci_info "environment option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'"
|
||||
ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'"
|
||||
@ -148,40 +143,35 @@ function ci_build {
|
||||
all_cmake_build_flags+=($CI_CMAKE_BUILD_FLAGS)
|
||||
all_ctest_flags+=($CI_CTEST_FLAGS)
|
||||
# And... build!
|
||||
# Use $CI_BUILD_TO_SRC_RELDIR and $CI_BUILD_TO_INSTALL_RELDIR
|
||||
# instead of $CI_SRC_DIR and $CI_INSTALL_DIR from this point onwards.
|
||||
ci_spawn mkdir -p "$CI_BUILD_DIR"
|
||||
ci_spawn cd "$CI_BUILD_DIR"
|
||||
[[ $CI_BUILD_TO_SRC_RELDIR -ef $CI_SRC_DIR ]] || {
|
||||
ci_err_internal "bad or missing \$CI_BUILD_TO_SRC_RELDIR"
|
||||
}
|
||||
ci_spawn mkdir -p "$CI_INSTALL_DIR"
|
||||
[[ $CI_BUILD_TO_INSTALL_RELDIR -ef $CI_INSTALL_DIR ]] || {
|
||||
ci_err_internal "bad or missing \$CI_BUILD_TO_INSTALL_RELDIR"
|
||||
}
|
||||
# Spawn "cmake ...".
|
||||
ci_spawn "$CI_CMAKE" -DCMAKE_INSTALL_PREFIX="$CI_BUILD_TO_INSTALL_RELDIR" \
|
||||
"${all_cmake_vars[@]}" \
|
||||
"$CI_BUILD_TO_SRC_RELDIR"
|
||||
# Spawn "cmake --build ...".
|
||||
ci_spawn "$CI_CMAKE" --build . \
|
||||
--config "$CI_CMAKE_BUILD_TYPE" \
|
||||
"${all_cmake_build_flags[@]}"
|
||||
ci_spawn "$CI_CMAKE" -B "$CI_BUILD_DIR" \
|
||||
-S . \
|
||||
-DCMAKE_INSTALL_PREFIX="$CI_INSTALL_DIR" \
|
||||
"${all_cmake_vars[@]}"
|
||||
ci_expr $((CI_NO_BUILD)) || {
|
||||
# Spawn "cmake --build ...".
|
||||
ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \
|
||||
--config "$CI_CMAKE_BUILD_TYPE" \
|
||||
"${all_cmake_build_flags[@]}"
|
||||
}
|
||||
ci_expr $((CI_NO_TEST)) || {
|
||||
# Spawn "ctest" if testing is not disabled.
|
||||
ci_spawn pushd "$CI_BUILD_DIR"
|
||||
ci_spawn "$CI_CTEST" --build-config "$CI_CMAKE_BUILD_TYPE" \
|
||||
"${all_ctest_flags[@]}"
|
||||
ci_spawn popd
|
||||
}
|
||||
ci_expr $((CI_NO_INSTALL)) || {
|
||||
# Spawn "cmake --build ... --target install" if installation is not disabled.
|
||||
ci_spawn "$CI_CMAKE" --build . \
|
||||
ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \
|
||||
--config "$CI_CMAKE_BUILD_TYPE" \
|
||||
--target install \
|
||||
"${all_cmake_build_flags[@]}"
|
||||
}
|
||||
ci_expr $((CI_NO_CLEAN)) || {
|
||||
# Spawn "make --build ... --target clean" if cleaning is not disabled.
|
||||
ci_spawn "$CI_CMAKE" --build . \
|
||||
ci_spawn "$CI_CMAKE" --build "$CI_BUILD_DIR" \
|
||||
--config "$CI_CMAKE_BUILD_TYPE" \
|
||||
--target clean \
|
||||
"${all_cmake_build_flags[@]}"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
@ -58,6 +58,7 @@ function ci_trace_build {
|
||||
ci_info "environment option: \$CI_LD_FLAGS: '$CI_LD_FLAGS'"
|
||||
ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'"
|
||||
ci_info "environment option: \$CI_FORCE: '$CI_FORCE'"
|
||||
ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'"
|
||||
ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'"
|
||||
ci_info "environment option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'"
|
||||
ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'"
|
||||
@ -122,13 +123,19 @@ function ci_build {
|
||||
ci_spawn export CFLAGS="${CFLAGS:-"-O2"} -fsanitize=$CI_SANITIZERS"
|
||||
ci_spawn export LDFLAGS="${LDFLAGS}${LDFLAGS:+" "}-fsanitize=$CI_SANITIZERS"
|
||||
}
|
||||
# Spawn "autogen.sh" if the configure script is not available.
|
||||
[[ -x "$CI_SRC_DIR/configure" ]] || {
|
||||
ci_spawn "$CI_SRC_DIR/autogen.sh" --maintainer
|
||||
}
|
||||
# And... build!
|
||||
ci_spawn mkdir -p "$CI_BUILD_DIR"
|
||||
ci_spawn cd "$CI_BUILD_DIR"
|
||||
# Spawn "configure".
|
||||
ci_spawn "$CI_SRC_DIR/configure" --prefix="$CI_INSTALL_DIR" $CI_CONFIGURE_FLAGS
|
||||
# Spawn "make".
|
||||
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS
|
||||
ci_expr $((CI_NO_BUILD)) || {
|
||||
# Spawn "make".
|
||||
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS
|
||||
}
|
||||
ci_expr $((CI_NO_TEST)) || {
|
||||
# Spawn "make test" if testing is not disabled.
|
||||
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS test
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
@ -51,6 +51,7 @@ function ci_trace_build {
|
||||
ci_info "environment option: \$CI_LIBS: '$CI_LIBS'"
|
||||
ci_info "environment option: \$CI_SANITIZERS: '$CI_SANITIZERS'"
|
||||
ci_info "environment option: \$CI_FORCE: '$CI_FORCE'"
|
||||
ci_info "environment option: \$CI_NO_BUILD: '$CI_NO_BUILD'"
|
||||
ci_info "environment option: \$CI_NO_TEST: '$CI_NO_TEST'"
|
||||
ci_info "environment option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'"
|
||||
ci_info "executable: \$CI_MAKE: $(command -V "$CI_MAKE")"
|
||||
@ -145,10 +146,12 @@ function ci_build {
|
||||
for my_makefile in $CI_MAKEFILES
|
||||
do
|
||||
ci_info "using makefile: $my_makefile"
|
||||
# Spawn "make".
|
||||
ci_spawn "$CI_MAKE" -f "$my_makefile" \
|
||||
"${all_make_flags[@]}" \
|
||||
"${all_make_vars[@]}"
|
||||
ci_expr $((CI_NO_BUILD)) || {
|
||||
# Spawn "make".
|
||||
ci_spawn "$CI_MAKE" -f "$my_makefile" \
|
||||
"${all_make_flags[@]}" \
|
||||
"${all_make_vars[@]}"
|
||||
}
|
||||
ci_expr $((CI_NO_TEST)) || {
|
||||
# Spawn "make test" if testing is not disabled.
|
||||
ci_spawn "$CI_MAKE" -f "$my_makefile" \
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
@ -12,33 +12,43 @@ set -o errexit -o pipefail -o posix
|
||||
source "$(dirname "$0")/lib/ci.lib.sh"
|
||||
cd "$CI_TOPLEVEL_DIR"
|
||||
|
||||
function ci_init_shellify {
|
||||
[[ -f $CI_SCRIPT_DIR/ci_shellify.sh ]] || {
|
||||
ci_err_internal "missing script: '$CI_SCRIPT_DIR/ci_shellify.sh'"
|
||||
}
|
||||
}
|
||||
# Declare the global environments collected from various sources.
|
||||
declare CI_ENV_LIBPNG_VER # collected from png.h
|
||||
declare CI_ENV_AUTOCONF_VER # collected from configure.ac
|
||||
declare CI_ENV_CMAKE_VER # collected from CMakeLists.txt
|
||||
declare CI_ENV_LIBPNGCONFIG_VER # collected from scripts/libpng-config-head.in
|
||||
|
||||
function ci_run_shellify {
|
||||
local my_script my_result
|
||||
my_script="$CI_SCRIPT_DIR/libexec/ci_shellify_${1#--}.sh"
|
||||
shift 1
|
||||
[[ -f $my_script ]] || {
|
||||
ci_err_internal "missing script: '$my_script'"
|
||||
}
|
||||
ci_info "shellifying:" "$@"
|
||||
local my_result
|
||||
"$BASH" "$CI_SCRIPT_DIR/ci_shellify.sh" "$@"
|
||||
"$BASH" "$my_script" "$@"
|
||||
echo "$my_result" | "$BASH" --posix || ci_err "bad shellify output"
|
||||
echo "$my_result"
|
||||
}
|
||||
|
||||
function ci_verify_version {
|
||||
function ci_init_version_verification {
|
||||
ci_info "## START OF VERIFICATION ##"
|
||||
local my_env_libpng_ver my_env_autoconf_ver my_env_cmake_ver my_expect
|
||||
ci_init_shellify
|
||||
my_env_libpng_ver="$(ci_run_shellify png.h)"
|
||||
echo "$my_env_libpng_ver"
|
||||
my_env_autoconf_ver="$(ci_run_shellify configure.ac)"
|
||||
echo "$my_env_autoconf_ver"
|
||||
my_env_cmake_ver="$(ci_run_shellify CMakeLists.txt)"
|
||||
echo "$my_env_cmake_ver"
|
||||
ci_info "## VERIFYING: png.h version definitions ##"
|
||||
eval "$my_env_libpng_ver"
|
||||
local my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}"
|
||||
CI_ENV_LIBPNG_VER="$(ci_run_shellify --c png.h)"
|
||||
echo "$CI_ENV_LIBPNG_VER"
|
||||
CI_ENV_AUTOCONF_VER="$(ci_run_shellify --autoconf configure.ac)"
|
||||
echo "$CI_ENV_AUTOCONF_VER"
|
||||
CI_ENV_CMAKE_VER="$(ci_run_shellify --cmake CMakeLists.txt)"
|
||||
echo "$CI_ENV_CMAKE_VER"
|
||||
CI_ENV_LIBPNGCONFIG_VER="$(ci_run_shellify --shell scripts/libpng-config-head.in)"
|
||||
echo "$CI_ENV_LIBPNGCONFIG_VER"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
function ci_do_version_verification {
|
||||
local my_expect
|
||||
ci_info "## VERIFYING: version definitions in 'png.h' ##"
|
||||
eval "$CI_ENV_LIBPNG_VER"
|
||||
my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}"
|
||||
if [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect"* ]]
|
||||
then
|
||||
ci_info "matched: \$PNG_LIBPNG_VER_STRING == $my_expect*"
|
||||
@ -77,7 +87,7 @@ function ci_verify_version {
|
||||
else
|
||||
ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD != [01]"
|
||||
fi
|
||||
ci_info "## VERIFYING: png.h build definitions ##"
|
||||
ci_info "## VERIFYING: build definitions in 'png.h' ##"
|
||||
my_expect="${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}"
|
||||
if [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect" ]]
|
||||
then
|
||||
@ -89,9 +99,9 @@ function ci_verify_version {
|
||||
fi
|
||||
if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -eq $PNG_LIBPNG_BUILD_STABLE ]]
|
||||
then
|
||||
ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_BETA"
|
||||
ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_STABLE"
|
||||
else
|
||||
ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_BETA"
|
||||
ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_STABLE"
|
||||
fi
|
||||
elif [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect".git ]]
|
||||
then
|
||||
@ -101,28 +111,28 @@ function ci_verify_version {
|
||||
else
|
||||
ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -eq 0"
|
||||
fi
|
||||
if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -eq $PNG_LIBPNG_BUILD_BETA ]]
|
||||
if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -ne $PNG_LIBPNG_BUILD_STABLE ]]
|
||||
then
|
||||
ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_BETA"
|
||||
ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_STABLE"
|
||||
else
|
||||
ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_BETA"
|
||||
ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -eq \$PNG_LIBPNG_BUILD_STABLE"
|
||||
fi
|
||||
else
|
||||
ci_err "unexpected: \$PNG_LIBPNG_VER_STRING == '$PNG_LIBPNG_VER_STRING'"
|
||||
fi
|
||||
ci_info "## VERIFYING: png.h type definitions ##"
|
||||
ci_info "## VERIFYING: type definitions in 'png.h' ##"
|
||||
my_expect="$(echo "png_libpng_version_${PNG_LIBPNG_VER_STRING}" | tr . _)"
|
||||
ci_spawn grep -w -e "$my_expect" png.h
|
||||
ci_info "## VERIFYING: configure.ac version definitions ##"
|
||||
eval "$my_env_autoconf_ver"
|
||||
ci_info "## VERIFYING: version definitions in 'configure.ac' ##"
|
||||
eval "$CI_ENV_AUTOCONF_VER"
|
||||
if [[ "$PNGLIB_VERSION" == "$PNG_LIBPNG_VER_STRING" ]]
|
||||
then
|
||||
ci_info "matched: \$PNGLIB_VERSION == \$PNG_LIBPNG_VER_STRING"
|
||||
else
|
||||
ci_err "mismatched: \$PNGLIB_VERSION != \$PNG_LIBPNG_VER_STRING"
|
||||
fi
|
||||
ci_info "## VERIFYING: CMakeLists.txt version definitions ##"
|
||||
eval "$my_env_cmake_ver"
|
||||
ci_info "## VERIFYING: version definitions in 'CMakeLists.txt' ##"
|
||||
eval "$CI_ENV_CMAKE_VER"
|
||||
if [[ "$PNGLIB_VERSION" == "$PNG_LIBPNG_VER_STRING" && "$PNGLIB_SUBREVISION" == 0 ]]
|
||||
then
|
||||
ci_info "matched: \$PNGLIB_VERSION == \$PNG_LIBPNG_VER_STRING"
|
||||
@ -133,8 +143,26 @@ function ci_verify_version {
|
||||
else
|
||||
ci_err "mismatched: \$PNGLIB_VERSION != \$PNG_LIBPNG_VER_STRING"
|
||||
fi
|
||||
ci_info "## VERIFYING: version definitions in 'scripts/libpng-config-head.in' ##"
|
||||
eval "$CI_ENV_LIBPNGCONFIG_VER"
|
||||
if [[ "$version" == "$PNG_LIBPNG_VER_STRING" ]]
|
||||
then
|
||||
ci_info "matched: \$version == \$PNG_LIBPNG_VER_STRING"
|
||||
else
|
||||
ci_err "mismatched: \$version != \$PNG_LIBPNG_VER_STRING"
|
||||
fi
|
||||
}
|
||||
|
||||
function ci_finish_version_verification {
|
||||
ci_info "## END OF VERIFICATION ##"
|
||||
ci_info "success!"
|
||||
# Relying on "set -o errexit" to not reach here in case of error.
|
||||
ci_info "## SUCCESS ##"
|
||||
}
|
||||
|
||||
function ci_verify_version {
|
||||
ci_init_version_verification
|
||||
ci_do_version_verification
|
||||
ci_finish_version_verification
|
||||
}
|
||||
|
||||
function usage {
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
@ -91,6 +91,9 @@ function ci_spawn {
|
||||
[[ ${CI_FORCE:-0} == [01] ]] || {
|
||||
ci_err "bad boolean option: \$CI_FORCE: '$CI_FORCE'"
|
||||
}
|
||||
[[ ${CI_NO_BUILD:-0} == [01] ]] || {
|
||||
ci_err "bad boolean option: \$CI_NO_BUILD: '$CI_NO_BUILD'"
|
||||
}
|
||||
[[ ${CI_NO_TEST:-0} == [01] ]] || {
|
||||
ci_err "bad boolean option: \$CI_NO_TEST: '$CI_NO_TEST'"
|
||||
}
|
||||
@ -100,3 +103,9 @@ function ci_spawn {
|
||||
[[ ${CI_NO_CLEAN:-0} == [01] ]] || {
|
||||
ci_err "bad boolean option: \$CI_NO_CLEAN: '$CI_NO_CLEAN'"
|
||||
}
|
||||
if ci_expr $((CI_NO_BUILD))
|
||||
then
|
||||
ci_expr $((CI_NO_TEST && CI_NO_INSTALL)) || {
|
||||
ci_err "\$CI_NO_BUILD requires \$CI_NO_TEST and \$CI_NO_INSTALL"
|
||||
}
|
||||
fi
|
||||
|
48
ci/libexec/ci_shellify_autoconf.sh
Executable file
48
ci/libexec/ci_shellify_autoconf.sh
Executable file
@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# shellcheck source=ci/lib/ci.lib.sh
|
||||
source "$(dirname "$0")/../lib/ci.lib.sh"
|
||||
|
||||
function ci_shellify_autoconf {
|
||||
# Convert autoconf (M4) text, specifically originating
|
||||
# from configure.ac, to shell scripting text.
|
||||
# Select only the easy-to-parse definitions of PNGLIB_*.
|
||||
sed -n -e '/^ *PNGLIB_[^ ]*=[$"0-9A-Za-z_]/ p' |
|
||||
sed -e 's/^ *PNG\([0-9A-Za-z_]*\)=\([^# ]*\).*$/PNG\1=\2/' \
|
||||
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $CI_SCRIPT_NAME [<options>] configure.ac"
|
||||
echo "options: -?|-h|--help"
|
||||
exit "${@:-0}"
|
||||
}
|
||||
|
||||
function main {
|
||||
local opt
|
||||
while getopts ":" opt
|
||||
do
|
||||
# This ain't a while-loop. It only pretends to be.
|
||||
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||
ci_err "unknown option: '$1'"
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
[[ $# -eq 0 ]] && usage 2
|
||||
[[ $# -eq 1 ]] || ci_err "too many operands"
|
||||
# And... go!
|
||||
test -e "$1" || ci_err "no such file: '$1'"
|
||||
[[ $(basename -- "$1") == configure.ac ]] || {
|
||||
ci_err "incorrect operand: '$1' (expecting: 'configure.ac')"
|
||||
}
|
||||
ci_shellify_autoconf <"$1"
|
||||
}
|
||||
|
||||
main "$@"
|
49
ci/libexec/ci_shellify_c.sh
Executable file
49
ci/libexec/ci_shellify_c.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# shellcheck source=ci/lib/ci.lib.sh
|
||||
source "$(dirname "$0")/../lib/ci.lib.sh"
|
||||
|
||||
function ci_shellify_c {
|
||||
# Convert C preprocessor text, specifically originating
|
||||
# from png.h, to shell scripting text.
|
||||
# Select only the easy-to-parse definitions of PNG_LIBPNG_*.
|
||||
sed -n -e '/^\# *define * PNG_LIBPNG_[^ ]* * ["0-9A-Za-z_]/ p' |
|
||||
sed -e 's/^\# *define * PNG\([^ ]*\) * \([^ ]*\)/PNG\1=\2/' \
|
||||
-e 's/=PNG\([0-9A-Za-z_]*\)/=\${PNG\1}/' \
|
||||
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $CI_SCRIPT_NAME [<options>] png.h"
|
||||
echo "options: -?|-h|--help"
|
||||
exit "${@:-0}"
|
||||
}
|
||||
|
||||
function main {
|
||||
local opt
|
||||
while getopts ":" opt
|
||||
do
|
||||
# This ain't a while-loop. It only pretends to be.
|
||||
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||
ci_err "unknown option: '$1'"
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
[[ $# -eq 0 ]] && usage 2
|
||||
[[ $# -eq 1 ]] || ci_err "too many operands"
|
||||
# And... go!
|
||||
test -e "$1" || ci_err "no such file: '$1'"
|
||||
[[ $(basename -- "$1") == png.h ]] || {
|
||||
ci_err "incorrect operand: '$1' (expecting: 'png.h')"
|
||||
}
|
||||
ci_shellify_c <"$1"
|
||||
}
|
||||
|
||||
main "$@"
|
49
ci/libexec/ci_shellify_cmake.sh
Executable file
49
ci/libexec/ci_shellify_cmake.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# shellcheck source=ci/lib/ci.lib.sh
|
||||
source "$(dirname "$0")/../lib/ci.lib.sh"
|
||||
|
||||
function ci_shellify_cmake {
|
||||
# Convert CMake lists text, specifically originating
|
||||
# from CMakeLists.txt, to shell scripting text.
|
||||
# Select only the easy-to-parse definitions of PNGLIB_*.
|
||||
sed -n -e '/^ *set *(PNGLIB_[^ ]* * [$"0-9A-Za-z_].*)/ p' |
|
||||
sed -e 's/^ *set *(PNG\([^ ]*\) * \([^() ]*\)).*$/PNG\1=\2/' \
|
||||
-e 's/^\([^ ]*=[^ ]*\).*$/export \1;/'
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $CI_SCRIPT_NAME [<options>] CMakeLists.txt"
|
||||
echo "options: -?|-h|--help"
|
||||
exit "${@:-0}"
|
||||
}
|
||||
|
||||
function main {
|
||||
local opt
|
||||
while getopts ":" opt
|
||||
do
|
||||
# This ain't a while-loop. It only pretends to be.
|
||||
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||
ci_err "unknown option: '$1'"
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
[[ $# -eq 0 ]] && usage 2
|
||||
[[ $# -eq 1 ]] || ci_err "too many operands"
|
||||
# And... go!
|
||||
test -e "$1" || ci_err "no such file: '$1'"
|
||||
filename="$(basename -- "$1")"
|
||||
[[ $filename == [Cc][Mm]ake[Ll]ists.txt ]] || {
|
||||
ci_err "incorrect operand: '$1' (expecting: 'CMakeLists.txt')"
|
||||
}
|
||||
ci_shellify_cmake <"$1"
|
||||
}
|
||||
|
||||
main "$@"
|
46
ci/libexec/ci_shellify_shell.sh
Executable file
46
ci/libexec/ci_shellify_shell.sh
Executable file
@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2025 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# shellcheck source=ci/lib/ci.lib.sh
|
||||
source "$(dirname "$0")/../lib/ci.lib.sh"
|
||||
|
||||
function ci_shellify_shell {
|
||||
# Convert shell scripting text to shell scripting text.
|
||||
# Select only the easy-to-parse version definitions.
|
||||
sed -n -e '/^ *[A-Za-z_][0-9A-Za-z_]*=[0-9][^ #]* *$/ p' |
|
||||
sed -e 's/^ *\([^ ]*=[^ ]*\) *$/export \1;/'
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $CI_SCRIPT_NAME [<options>] libpng-config-head.in"
|
||||
echo "options: -?|-h|--help"
|
||||
exit "${@:-0}"
|
||||
}
|
||||
|
||||
function main {
|
||||
local opt
|
||||
while getopts ":" opt
|
||||
do
|
||||
# This ain't a while-loop. It only pretends to be.
|
||||
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||
ci_err "unknown option: '$1'"
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
[[ $# -eq 0 ]] && usage 2
|
||||
[[ $# -eq 1 ]] || ci_err "too many operands"
|
||||
# And... go!
|
||||
test -e "$1" || ci_err "no such file: '$1'"
|
||||
[[ $(basename -- "$1") == libpng-config-head.in ]] || {
|
||||
ci_err "incorrect operand: '$1' (expecting: 'libpng-config-head.in')"
|
||||
}
|
||||
ci_shellify_shell <"$1"
|
||||
}
|
||||
|
||||
main "$@"
|
16
ci/targets/android/ci_env.aarch64-linux-android.sh
Normal file
16
ci/targets/android/ci_env.aarch64-linux-android.sh
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=aarch64
|
||||
export CI_TARGET_ARCHVER=aarch64
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=android
|
||||
export CI_TARGET_ABIVER=android29
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
|
||||
export CI_AR="llvm-ar"
|
||||
export CI_RANLIB="llvm-ranlib"
|
16
ci/targets/android/ci_env.armv7a-linux-androideabi.sh
Normal file
16
ci/targets/android/ci_env.armv7a-linux-androideabi.sh
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=arm
|
||||
export CI_TARGET_ARCHVER=armv7a
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=androideabi
|
||||
export CI_TARGET_ABIVER=androideabi29
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
|
||||
export CI_AR="llvm-ar"
|
||||
export CI_RANLIB="llvm-ranlib"
|
16
ci/targets/android/ci_env.i686-linux-android.sh
Normal file
16
ci/targets/android/ci_env.i686-linux-android.sh
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i686
|
||||
export CI_TARGET_ARCHVER=i686
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=android
|
||||
export CI_TARGET_ABIVER=android29
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
|
||||
export CI_AR="llvm-ar"
|
||||
export CI_RANLIB="llvm-ranlib"
|
16
ci/targets/android/ci_env.x86_64-linux-android.sh
Normal file
16
ci/targets/android/ci_env.x86_64-linux-android.sh
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=x86_64
|
||||
export CI_TARGET_ARCHVER=x86_64
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=android
|
||||
export CI_TARGET_ABIVER=android29
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
|
||||
export CI_AR="llvm-ar"
|
||||
export CI_RANLIB="llvm-ranlib"
|
18
ci/targets/cygwin/ci_env.i686-pc-cygwin.sh
Normal file
18
ci/targets/cygwin/ci_env.i686-pc-cygwin.sh
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i686
|
||||
export CI_TARGET_SYSTEM=cygwin
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
|
||||
export CI_AR="$CI_CC-ar"
|
||||
export CI_RANLIB="$CI_CC-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=CYGWIN
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
18
ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh
Normal file
18
ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=x86_64
|
||||
export CI_TARGET_SYSTEM=cygwin
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
|
||||
export CI_AR="$CI_CC-ar"
|
||||
export CI_RANLIB="$CI_CC-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=CYGWIN
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
15
ci/targets/darwin/ci_env.arm64-apple-darwin.sh
Normal file
15
ci/targets/darwin/ci_env.arm64-apple-darwin.sh
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=arm64
|
||||
export CI_TARGET_SYSTEM=darwin
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Darwin
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
-DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH
|
||||
"
|
15
ci/targets/darwin/ci_env.x86_64-apple-darwin.sh
Normal file
15
ci/targets/darwin/ci_env.x86_64-apple-darwin.sh
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=x86_64
|
||||
export CI_TARGET_SYSTEM=darwin
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Darwin
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
-DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH
|
||||
"
|
14
ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh
Normal file
14
ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=aarch64
|
||||
export CI_TARGET_SYSTEM=freebsd
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=FreeBSD
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
14
ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh
Normal file
14
ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i686
|
||||
export CI_TARGET_SYSTEM=freebsd
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=FreeBSD
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
14
ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh
Normal file
14
ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=riscv64
|
||||
export CI_TARGET_SYSTEM=freebsd
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=FreeBSD
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
14
ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh
Normal file
14
ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=x86_64
|
||||
export CI_TARGET_SYSTEM=freebsd
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=FreeBSD
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.aarch64-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.aarch64-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=aarch64
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.arm-linux-gnueabi.sh
Normal file
21
ci/targets/linux/ci_env.arm-linux-gnueabi.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=arm
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnueabi
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.arm-linux-gnueabihf.sh
Normal file
21
ci/targets/linux/ci_env.arm-linux-gnueabihf.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=arm
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnueabihf
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.i686-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.i686-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i686
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.mips-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.mips-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=mips
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh
Normal file
21
ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=mips64
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnuabi64
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh
Normal file
21
ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=mips64el
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnuabi64
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.mipsel-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.mipsel-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=mipsel
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=mipsisa32r6
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=mipsisa32r6el
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh
Normal file
21
ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=mipsisa64r6
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnuabi64
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh
Normal file
21
ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=mipsisa64r6el
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnuabi64
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.powerpc-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.powerpc-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=powerpc
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.powerpc64-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.powerpc64-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=powerpc64
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=powerpc64le
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.riscv64-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.riscv64-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=riscv64
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/linux/ci_env.x86_64-linux-gnu.sh
Normal file
21
ci/targets/linux/ci_env.x86_64-linux-gnu.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=x86_64
|
||||
export CI_TARGET_SYSTEM=linux
|
||||
export CI_TARGET_ABI=gnu
|
||||
|
||||
export CI_GCC="${CI_GCC-gcc}"
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
|
||||
export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
|
||||
export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Linux
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
18
ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh
Normal file
18
ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i386
|
||||
export CI_TARGET_SYSTEM=msdoswatcom
|
||||
|
||||
export CI_CC="wcl386"
|
||||
|
||||
# Open Watcom V2 CMake build
|
||||
# https://github.com/open-watcom/open-watcom-v2/discussions/716
|
||||
export CI_CMAKE_GENERATOR="Watcom WMake"
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=DOS
|
||||
"
|
18
ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh
Normal file
18
ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i586
|
||||
export CI_TARGET_SYSTEM=msdosdjgpp
|
||||
|
||||
export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
|
||||
export CI_AR="$CI_CC-ar"
|
||||
export CI_RANLIB="$CI_CC-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Generic
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
19
ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh
Normal file
19
ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i86
|
||||
export CI_TARGET_SYSTEM=msdoswatcom
|
||||
|
||||
export CI_CC="wcl"
|
||||
|
||||
# Open Watcom V2 CMake build
|
||||
# https://github.com/open-watcom/open-watcom-v2/discussions/716
|
||||
export CI_CMAKE_GENERATOR="Watcom WMake"
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=DOS
|
||||
-DCMAKE_SYSTEM_PROCESSOR=I86
|
||||
"
|
18
ci/targets/windows/ci_env.aarch64-windows-llvm.sh
Normal file
18
ci/targets/windows/ci_env.aarch64-windows-llvm.sh
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=aarch64
|
||||
export CI_TARGET_SYSTEM=windows
|
||||
|
||||
export CI_CC="clang"
|
||||
export CI_AR="llvm-ar"
|
||||
export CI_RANLIB="llvm-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Windows
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/windows/ci_env.i686-w64-mingw32.sh
Normal file
21
ci/targets/windows/ci_env.i686-w64-mingw32.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i686
|
||||
export CI_TARGET_SYSTEM=mingw32
|
||||
|
||||
# The output of `uname -s` on MSYS2 is understandable, and so is
|
||||
# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.)
|
||||
# But aside from that, the Mingw-w64 nomenclature is rather messy.
|
||||
export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc"
|
||||
export CI_AR="$CI_CC-ar"
|
||||
export CI_RANLIB="$CI_CC-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Windows
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
18
ci/targets/windows/ci_env.i686-windows-llvm.sh
Normal file
18
ci/targets/windows/ci_env.i686-windows-llvm.sh
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=i686
|
||||
export CI_TARGET_SYSTEM=windows
|
||||
|
||||
export CI_CC="clang"
|
||||
export CI_AR="llvm-ar"
|
||||
export CI_RANLIB="llvm-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Windows
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
21
ci/targets/windows/ci_env.x86_64-w64-mingw32.sh
Normal file
21
ci/targets/windows/ci_env.x86_64-w64-mingw32.sh
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=x86_64
|
||||
export CI_TARGET_SYSTEM=mingw64
|
||||
|
||||
# The output of `uname -s` on MSYS2 is understandable, and so is
|
||||
# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.)
|
||||
# But aside from that, the Mingw-w64 nomenclature is rather messy.
|
||||
export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc"
|
||||
export CI_AR="$CI_CC-ar"
|
||||
export CI_RANLIB="$CI_CC-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Windows
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
18
ci/targets/windows/ci_env.x86_64-windows-llvm.sh
Normal file
18
ci/targets/windows/ci_env.x86_64-windows-llvm.sh
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2023-2024 Cosmin Truta.
|
||||
#
|
||||
# Use, modification and distribution are subject to the MIT License.
|
||||
# Please see the accompanying file LICENSE_MIT.txt
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
export CI_TARGET_ARCH=x86_64
|
||||
export CI_TARGET_SYSTEM=windows
|
||||
|
||||
export CI_CC="clang"
|
||||
export CI_AR="llvm-ar"
|
||||
export CI_RANLIB="llvm-ranlib"
|
||||
|
||||
export CI_CMAKE_VARS="
|
||||
-DCMAKE_SYSTEM_NAME=Windows
|
||||
-DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
|
||||
"
|
42
compile
42
compile
@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
scriptversion=2025-06-18.21; # UTC
|
||||
|
||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@ -37,11 +37,11 @@ IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# func_file_conv build_file unneeded_conversions
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
|
||||
# conversion will take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
@ -51,9 +51,20 @@ func_file_conv ()
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
|
||||
# MSYS2 environment.
|
||||
file_conv=cygwin
|
||||
else
|
||||
# Original MinGW environment.
|
||||
file_conv=mingw
|
||||
fi
|
||||
;;
|
||||
CYGWIN* | MSYS*)
|
||||
MSYS*)
|
||||
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
|
||||
file_conv=cygwin
|
||||
;;
|
||||
CYGWIN*)
|
||||
# Cygwin environment.
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
@ -63,12 +74,14 @@ func_file_conv ()
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
# This is the optimization mentioned above:
|
||||
# If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/* | msys/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
cygwin/*)
|
||||
file=`cygpath -w "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
@ -143,7 +156,7 @@ func_cl_wrapper ()
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
*.o | *.lo | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
@ -248,14 +261,17 @@ If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
GNU Automake home page: <https://www.gnu.org/software/automake/>.
|
||||
General help using GNU software: <https://www.gnu.org/gethelp/>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
echo "compile (GNU Automake) $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||
clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
|
||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
@ -340,9 +356,9 @@ exit $ret
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-format: "%Y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
|
20
config.guess
vendored
20
config.guess
vendored
@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2023 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2023-08-22'
|
||||
timestamp='2024-07-27'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -60,7 +60,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2023 Free Software Foundation, Inc.
|
||||
Copyright 1992-2024 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@ -123,7 +123,7 @@ set_cc_for_build() {
|
||||
dummy=$tmp/dummy
|
||||
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
||||
,,) echo "int x;" > "$dummy.c"
|
||||
for driver in cc gcc c89 c99 ; do
|
||||
for driver in cc gcc c17 c99 c89 ; do
|
||||
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD=$driver
|
||||
break
|
||||
@ -165,6 +165,8 @@ Linux|GNU|GNU/*)
|
||||
LIBC=dietlibc
|
||||
#elif defined(__GLIBC__)
|
||||
LIBC=gnu
|
||||
#elif defined(__LLVM_LIBC__)
|
||||
LIBC=llvm
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
/* First heuristic to detect musl libc. */
|
||||
@ -632,7 +634,8 @@ EOF
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
@ -716,7 +719,8 @@ EOF
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main ()
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
@ -1593,6 +1597,9 @@ EOF
|
||||
*:Unleashed:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||
;;
|
||||
*:Ironclad:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-ironclad
|
||||
;;
|
||||
esac
|
||||
|
||||
# Do we have a guess based on uname results?
|
||||
@ -1616,6 +1623,7 @@ cat > "$dummy.c" <<EOF
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
|
@ -108,6 +108,9 @@
|
||||
/* Enable POWERPC VSX optimizations */
|
||||
#undef PNG_POWERPC_VSX_OPT
|
||||
|
||||
/* Enable RISCV RVV optimizations */
|
||||
#undef PNG_RISCV_RVV_OPT
|
||||
|
||||
/* Define to 1 if all of the C89 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
|
752
config.sub
vendored
752
config.sub
vendored
File diff suppressed because it is too large
Load Diff
86
configure.ac
86
configure.ac
@ -25,7 +25,7 @@ AC_PREREQ([2.68])
|
||||
|
||||
dnl Version number stuff here:
|
||||
|
||||
AC_INIT([libpng],[1.6.43],[png-mng-implement@lists.sourceforge.net])
|
||||
AC_INIT([libpng],[1.6.51.git],[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.43
|
||||
PNGLIB_VERSION=1.6.51.git
|
||||
PNGLIB_MAJOR=1
|
||||
PNGLIB_MINOR=6
|
||||
PNGLIB_RELEASE=43
|
||||
PNGLIB_RELEASE=51
|
||||
|
||||
dnl End of version number stuff
|
||||
|
||||
AC_CONFIG_SRCDIR([pngget.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
# Check for basic programs.
|
||||
# Check the basic programs.
|
||||
AC_LANG([C])
|
||||
AC_PROG_CC
|
||||
AM_PROG_AS
|
||||
@ -343,6 +343,9 @@ AC_ARG_ENABLE([hardware-optimizations],
|
||||
enable_loongarch_lsx=no
|
||||
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [0],
|
||||
[Disable LOONGARCH_LSX optimizations])
|
||||
enable_riscv_rvv=no
|
||||
AC_DEFINE([PNG_RISCV_RVV_OPT], [0],
|
||||
[Disable RISC-V Vector optimizations])
|
||||
;;
|
||||
*)
|
||||
# allow enabling hardware optimization on any system:
|
||||
@ -375,6 +378,11 @@ AC_ARG_ENABLE([hardware-optimizations],
|
||||
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
|
||||
[Enable LOONGARCH_LSX optimizations])
|
||||
;;
|
||||
riscv64)
|
||||
enable_riscv_rvv=yes
|
||||
AC_DEFINE([PNG_RISCV_RVV_OPT], [2],
|
||||
[Enable RISC-V Vector optimizations])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac])
|
||||
@ -661,6 +669,76 @@ AM_CONDITIONAL([PNG_LOONGARCH_LSX],
|
||||
*) test "$enable_loongarch_lsx" != '' ;;
|
||||
esac])
|
||||
|
||||
# RISC-V
|
||||
# ======
|
||||
#
|
||||
# RISC-V Vector support.
|
||||
|
||||
AC_ARG_ENABLE([riscv-rvv],
|
||||
AS_HELP_STRING([[[--enable-riscv-rvv]]],
|
||||
[Enable RISC-V Vector 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. If not specified: determined by the compiler.]),
|
||||
[case "$enableval" in
|
||||
no|off)
|
||||
# disable the default enabling on __riscv systems:
|
||||
AC_DEFINE([PNG_RISCV_RVV_OPT], [0],
|
||||
[Disable RISC-V Vector optimizations])
|
||||
# Prevent inclusion of the platform-specific files below:
|
||||
enable_riscv_rvv=no ;;
|
||||
yes|on)
|
||||
AC_DEFINE([PNG_RISCV_RVV_OPT], [2],
|
||||
[Enable RISC-V Vector optimizations])
|
||||
AC_MSG_WARN([--enable-riscv-rvv:]
|
||||
[if you want the optimizations pass e.g. '-march=rv64gv1p0' to the compiler.]);;
|
||||
*)
|
||||
AC_MSG_ERROR([--enable-riscv-rvv=${enable_riscv_rvv}: invalid value])
|
||||
esac])
|
||||
|
||||
if test "$enable_riscv_rvv" != "no" &&
|
||||
case "$host_cpu" in
|
||||
riscv64) : ;;
|
||||
*) test "$enable_riscv_rvv" != '' ;;
|
||||
esac
|
||||
then
|
||||
compiler_support_riscv_rvv=no
|
||||
AC_MSG_CHECKING(whether to use RISC-V RVV intrinsics)
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <riscv_vector.h>
|
||||
#include <asm/hwcap.h>
|
||||
#ifndef COMPAT_HWCAP_ISA_V /* added in linux-6.5 */
|
||||
#error "COMPAT_HWCAP_ISA_V is not available"
|
||||
#endif
|
||||
int main() {
|
||||
const float src[] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
uint64_t ptr[2] = {0x0908060504020100, 0xFFFFFFFF0E0D0C0A};
|
||||
vuint8m1_t a = __riscv_vreinterpret_v_u64m1_u8m1(__riscv_vle64_v_u64m1(ptr, 2));
|
||||
vfloat32m1_t val = __riscv_vle32_v_f32m1((const float*)(src), 4);
|
||||
return (int)__riscv_vfmv_f_s_f32m1_f32(val);
|
||||
}]])],compiler_support_riscv_rvv=yes)
|
||||
AC_MSG_RESULT($compiler_support_riscv_rvv)
|
||||
if test "$compiler_support_riscv_rvv" = "yes"; then
|
||||
AC_DEFINE([PNG_RISCV_RVV_OPT], [1],
|
||||
[Enable RISCV RVV optimizations])
|
||||
else
|
||||
AC_MSG_WARN([Compiler does not support riscv rvv.])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Add RISC-V-specific files to all builds where $host_cpu is riscv ('riscv64')
|
||||
# or where RISC-V optimizations were explicitly requested (this allows a fallback
|
||||
# if a future host CPU does not match 'riscv64')
|
||||
|
||||
AM_CONDITIONAL([PNG_RISCV_RVV],
|
||||
[test "$enable_riscv_rvv" != "no" &&
|
||||
test "$compiler_support_riscv_rvv" = "yes" &&
|
||||
case "$host_cpu" in
|
||||
riscv64) : ;;
|
||||
*) test "$compiler_support_riscv_rvv" != '' ;;
|
||||
esac])
|
||||
|
||||
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
|
||||
|
||||
# Config files, substituting as above
|
||||
|
@ -3,5 +3,7 @@
|
||||
root = false
|
||||
|
||||
[*.[ch]]
|
||||
indent_size = unset
|
||||
indent_style = unset
|
||||
max_doc_length = unset
|
||||
max_line_length = unset
|
||||
|
@ -1,3 +1,5 @@
|
||||
External contributions to libpng
|
||||
--------------------------------
|
||||
|
||||
This "contrib" directory contains contributions which are not necessarily under
|
||||
the libpng license, although all are open source. They are not part of
|
||||
|
15
contrib/conftest/fixed.dfa
Normal file
15
contrib/conftest/fixed.dfa
Normal file
@ -0,0 +1,15 @@
|
||||
# fixed.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2025
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Test the standard libpng configuration without floating point (the internal
|
||||
# fixed point implementations are used instead).
|
||||
#
|
||||
option FLOATING_ARITHMETIC off
|
||||
option FLOATING_POINT off
|
14
contrib/conftest/float-fixed.dfa
Normal file
14
contrib/conftest/float-fixed.dfa
Normal file
@ -0,0 +1,14 @@
|
||||
# fixed-float.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2025
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Test the standard libpng configuration with the fixed point internal
|
||||
# implementation in place of the default floating point
|
||||
#
|
||||
option FLOATING_ARITHMETIC off
|
21
contrib/conftest/nocompile-limits.dfa
Normal file
21
contrib/conftest/nocompile-limits.dfa
Normal file
@ -0,0 +1,21 @@
|
||||
# nolimits.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2025
|
||||
#
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Build libpng without any limits and without run-time settable limits. Turning
|
||||
# USER_LIMITS off reduces libpng code size by allowing compile-time elimination
|
||||
# of some checking code.
|
||||
#
|
||||
option USER_LIMITS off
|
||||
|
||||
@# define PNG_USER_WIDTH_MAX PNG_UINT_31_MAX
|
||||
@# define PNG_USER_HEIGHT_MAX PNG_UINT_31_MAX
|
||||
@# define PNG_USER_CHUNK_CACHE_MAX 0
|
||||
@# define PNG_USER_CHUNK_MALLOC_MAX 0
|
19
contrib/conftest/nolimits.dfa
Normal file
19
contrib/conftest/nolimits.dfa
Normal file
@ -0,0 +1,19 @@
|
||||
# nolimits.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2025
|
||||
#
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Build libpng without any limits. With these settigs run-time limits are still
|
||||
# possible.
|
||||
#
|
||||
@# define PNG_USER_WIDTH_MAX PNG_UINT_31_MAX
|
||||
@# define PNG_USER_HEIGHT_MAX PNG_UINT_31_MAX
|
||||
@# define PNG_USER_CHUNK_CACHE_MAX 0
|
||||
@# define PNG_USER_CHUNK_MALLOC_MAX 0
|
||||
|
13
contrib/conftest/read-full.dfa
Normal file
13
contrib/conftest/read-full.dfa
Normal file
@ -0,0 +1,13 @@
|
||||
# read-full.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2025
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Build libpng with no write support and full read support.
|
||||
#
|
||||
option WRITE off
|
13
contrib/conftest/write-full.dfa
Normal file
13
contrib/conftest/write-full.dfa
Normal file
@ -0,0 +1,13 @@
|
||||
# write-full.dfa
|
||||
# Build time configuration of libpng
|
||||
#
|
||||
# Author: John Bowler
|
||||
# Copyright: (c) John Bowler, 2025
|
||||
# Usage rights:
|
||||
# To the extent possible under law, the author has waived all copyright and
|
||||
# related or neighboring rights to this work. This work is published from:
|
||||
# United States.
|
||||
#
|
||||
# Build libpng with no read support and full write support.
|
||||
#
|
||||
option READ off
|
143
contrib/examples/.clang-format
Normal file
143
contrib/examples/.clang-format
Normal file
@ -0,0 +1,143 @@
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -3
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignArrayOfStructures: None
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: false
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: false
|
||||
AlignConsecutiveShortCaseStatements:
|
||||
Enabled: false
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AlignOperands: false
|
||||
AlignTrailingComments:
|
||||
Kind: Never
|
||||
OverEmptyLines: 0
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowBreakBeforeNoexceptSpecifier: Never
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseExpressionOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
AllowShortCompoundRequirementOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortNamespacesOnASingleLine: false
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: BinPack
|
||||
BitFieldColonSpacing: Both
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: true
|
||||
AfterClass: true
|
||||
AfterControlStatement: Always
|
||||
AfterEnum: true
|
||||
AfterExternBlock: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakAdjacentStringLiterals: true
|
||||
BreakAfterAttributes: Leave
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakAfterReturnType: TopLevel
|
||||
BreakArrays: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeConceptDeclarations: Always
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakStringLiterals: false
|
||||
BreakTemplateDeclarations: MultiLine
|
||||
ColumnLimit: 79
|
||||
ContinuationIndentWidth: 3
|
||||
DerivePointerAlignment: true
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
FixNamespaceComments: true
|
||||
IncludeBlocks: Preserve
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: true
|
||||
IndentCaseLabels: true
|
||||
IndentExportBlock: true
|
||||
IndentExternBlock: AfterExternBlock
|
||||
IndentGotoLabels: false
|
||||
IndentPPDirectives: None
|
||||
IndentRequiresClause: true
|
||||
IndentWidth: 3
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLines:
|
||||
AtEndOfFile: false
|
||||
AtStartOfBlock: false
|
||||
AtStartOfFile: false
|
||||
KeepFormFeed: false
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: None
|
||||
PackConstructorInitializers: Never
|
||||
PointerAlignment: Left
|
||||
QualifierAlignment: Custom
|
||||
QualifierOrder: [static, inline, constexpr, const, volatile, restrict, type]
|
||||
ReferenceAlignment: Pointer
|
||||
ReflowComments: Never
|
||||
RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: LexicographicNumeric
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeJsonColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeParensOptions:
|
||||
AfterControlStatements: true
|
||||
AfterFunctionDefinitionName: false
|
||||
AfterFunctionDeclarationName: false
|
||||
AfterOverloadedOperator: false
|
||||
AfterPlacementOperator: true
|
||||
AfterRequiresInClause: false
|
||||
AfterRequiresInExpression: false
|
||||
BeforeNonEmptyParentheses: false
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: Never
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
SpacesInParens: Never
|
||||
SpacesInParensOptions:
|
||||
ExceptDoubleParentheses: false
|
||||
InCStyleCasts: false
|
||||
InConditionalStatements: false
|
||||
InEmptyParentheses: false
|
||||
Other: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Latest
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
WrapNamespaceBodyWithEmptyLines: Leave
|
||||
...
|
@ -1,4 +1,3 @@
|
||||
|
||||
This directory (contrib/examples) contains examples of libpng usage.
|
||||
|
||||
NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY.
|
||||
|
@ -26,8 +26,9 @@
|
||||
|
||||
#include <png.h>
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) && \
|
||||
defined (PNG_iCCP_SUPPORTED)
|
||||
#if !defined(PNG_iCCP_SUPPORTED) || !defined(PNG_READ_SUPPORTED)
|
||||
#error This program requires libpng supporting the iCCP chunk and the read API
|
||||
#endif
|
||||
|
||||
|
||||
static int verbose = 1;
|
||||
@ -36,7 +37,8 @@ static png_byte no_profile[] = "no profile";
|
||||
static png_bytep
|
||||
extract(FILE *fp, png_uint_32 *proflen)
|
||||
{
|
||||
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
|
||||
png_structp png_ptr =
|
||||
png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
png_infop info_ptr = NULL;
|
||||
png_bytep result = NULL;
|
||||
|
||||
@ -69,7 +71,7 @@ extract(FILE *fp, png_uint_32 *proflen)
|
||||
png_bytep profile;
|
||||
|
||||
if (png_get_iCCP(png_ptr, info_ptr, &name, &compression_type, &profile,
|
||||
proflen) & PNG_INFO_iCCP)
|
||||
proflen) & PNG_INFO_iCCP)
|
||||
{
|
||||
result = malloc(*proflen);
|
||||
if (result != NULL)
|
||||
@ -107,7 +109,7 @@ extract_one_file(const char *filename)
|
||||
const char *ep = strrchr(filename, '.');
|
||||
|
||||
if (ep != NULL)
|
||||
len = ep-filename;
|
||||
len = ep - filename;
|
||||
|
||||
else
|
||||
len = strlen(filename);
|
||||
@ -119,14 +121,14 @@ extract_one_file(const char *filename)
|
||||
FILE *of;
|
||||
|
||||
memcpy(output, filename, len);
|
||||
strcpy(output+len, ".icc");
|
||||
strcpy(output + len, ".icc");
|
||||
|
||||
of = fopen(output, "wb");
|
||||
if (of != NULL)
|
||||
{
|
||||
if (fwrite(profile, proflen, 1, of) == 1 &&
|
||||
fflush(of) == 0 &&
|
||||
fclose(of) == 0)
|
||||
fflush(of) == 0 &&
|
||||
fclose(of) == 0)
|
||||
{
|
||||
if (verbose)
|
||||
printf("%s -> %s\n", filename, output);
|
||||
@ -161,6 +163,9 @@ extract_one_file(const char *filename)
|
||||
else
|
||||
fprintf(stderr, "%s: could not open file\n", filename);
|
||||
|
||||
if (fp != NULL)
|
||||
fclose(fp);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -170,7 +175,7 @@ main(int argc, char **argv)
|
||||
int i;
|
||||
int extracted = 0;
|
||||
|
||||
for (i=1; i<argc; ++i)
|
||||
for (i = 1; i < argc; ++i)
|
||||
{
|
||||
if (strcmp(argv[i], "-q") == 0)
|
||||
verbose = 0;
|
||||
@ -182,4 +187,3 @@ main(int argc, char **argv)
|
||||
/* Exit code is true if any extract succeeds */
|
||||
return extracted == 0;
|
||||
}
|
||||
#endif /* READ && STDIO && iCCP */
|
||||
|
@ -15,8 +15,8 @@
|
||||
* images. Normally you would call png_set_interlace_handling() to have libpng
|
||||
* deal with the interlace for you, but that obliges you to buffer half of the
|
||||
* image to assemble the interlaced rows. In this code
|
||||
* png_set_interlace_handling() is not called and, instead, the code handles the
|
||||
* interlace passes directly looking for the required pixel.
|
||||
* png_set_interlace_handling() is not called and, instead, the code handles
|
||||
* the interlace passes directly looking for the required pixel.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -27,34 +27,37 @@
|
||||
*/
|
||||
#include "../../png.h"
|
||||
|
||||
#if defined(PNG_READ_SUPPORTED) && defined(PNG_SEQUENTIAL_READ_SUPPORTED)
|
||||
#if !defined(PNG_READ_SUPPORTED) || !defined(PNG_SEQUENTIAL_READ_SUPPORTED)
|
||||
#error This program requires libpng supporting the read and sequential read API
|
||||
#endif
|
||||
|
||||
|
||||
/* Return component 'c' of pixel 'x' from the given row. */
|
||||
static unsigned int
|
||||
component(png_const_bytep row, png_uint_32 x, unsigned int c,
|
||||
unsigned int bit_depth, unsigned int channels)
|
||||
unsigned int bit_depth, unsigned int channels)
|
||||
{
|
||||
/* PNG images can be up to 2^31 pixels wide, but this means they can be up to
|
||||
* 2^37 bits wide (for a 64-bit pixel - the largest possible) and hence 2^34
|
||||
* bytes wide. Since the row fitted into memory, however, the following must
|
||||
/* PNG images can be up to 2^31 pixels wide, which means they can be up to
|
||||
* 2^37 bits wide (for a 64-bit pixel - the largest possible) and hence
|
||||
* 2^34 bytes wide. Since the row fitted into memory, the following must
|
||||
* work:
|
||||
*/
|
||||
png_uint_32 bit_offset_hi = bit_depth * ((x >> 6) * channels);
|
||||
png_uint_32 bit_offset_lo = bit_depth * ((x & 0x3f) * channels + c);
|
||||
|
||||
row = (png_const_bytep)(((const png_byte (*)[8])row) + bit_offset_hi);
|
||||
row = (png_const_bytep)(((const png_byte(*)[8])row) + bit_offset_hi);
|
||||
row += bit_offset_lo >> 3;
|
||||
bit_offset_lo &= 0x07;
|
||||
|
||||
/* PNG pixels are packed into bytes to put the first pixel in the highest
|
||||
* bits of the byte and into two bytes for 16-bit values with the high 8 bits
|
||||
* first, so:
|
||||
* bits of the byte, and into two bytes for 16-bit values with the high
|
||||
* 8 bits first, so:
|
||||
*/
|
||||
switch (bit_depth)
|
||||
{
|
||||
case 1: return (row[0] >> (7-bit_offset_lo)) & 0x01;
|
||||
case 2: return (row[0] >> (6-bit_offset_lo)) & 0x03;
|
||||
case 4: return (row[0] >> (4-bit_offset_lo)) & 0x0f;
|
||||
case 1: return (row[0] >> (7 - bit_offset_lo)) & 0x01;
|
||||
case 2: return (row[0] >> (6 - bit_offset_lo)) & 0x03;
|
||||
case 4: return (row[0] >> (4 - bit_offset_lo)) & 0x0f;
|
||||
case 8: return row[0];
|
||||
case 16: return (row[0] << 8) + row[1];
|
||||
default:
|
||||
@ -71,7 +74,7 @@ component(png_const_bytep row, png_uint_32 x, unsigned int c,
|
||||
*/
|
||||
static void
|
||||
print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
||||
png_uint_32 x)
|
||||
png_uint_32 x)
|
||||
{
|
||||
unsigned int bit_depth = png_get_bit_depth(png_ptr, info_ptr);
|
||||
|
||||
@ -92,22 +95,24 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
||||
int num_palette = 0;
|
||||
|
||||
if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) &
|
||||
PNG_INFO_PLTE) && num_palette > 0 && palette != NULL)
|
||||
PNG_INFO_PLTE) &&
|
||||
(num_palette > 0) &&
|
||||
(palette != NULL))
|
||||
{
|
||||
png_bytep trans_alpha = NULL;
|
||||
int num_trans = 0;
|
||||
if ((png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans,
|
||||
NULL) & PNG_INFO_tRNS) && num_trans > 0 &&
|
||||
trans_alpha != NULL)
|
||||
NULL) & PNG_INFO_tRNS) &&
|
||||
(num_trans > 0) &&
|
||||
(trans_alpha != NULL))
|
||||
printf("INDEXED %u = %d %d %d %d\n", index,
|
||||
palette[index].red, palette[index].green,
|
||||
palette[index].blue,
|
||||
index < num_trans ? trans_alpha[index] : 255);
|
||||
palette[index].red, palette[index].green,
|
||||
palette[index].blue,
|
||||
index < num_trans ? trans_alpha[index] : 255);
|
||||
|
||||
else /* no transparency */
|
||||
printf("INDEXED %u = %d %d %d\n", index,
|
||||
palette[index].red, palette[index].green,
|
||||
palette[index].blue);
|
||||
printf("INDEXED %u = %d %d %d\n", index, palette[index].red,
|
||||
palette[index].green, palette[index].blue);
|
||||
}
|
||||
|
||||
else
|
||||
@ -117,20 +122,20 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
||||
|
||||
case PNG_COLOR_TYPE_RGB:
|
||||
printf("RGB %u %u %u\n", component(row, x, 0, bit_depth, 3),
|
||||
component(row, x, 1, bit_depth, 3),
|
||||
component(row, x, 2, bit_depth, 3));
|
||||
component(row, x, 1, bit_depth, 3),
|
||||
component(row, x, 2, bit_depth, 3));
|
||||
return;
|
||||
|
||||
case PNG_COLOR_TYPE_GRAY_ALPHA:
|
||||
printf("GRAY+ALPHA %u %u\n", component(row, x, 0, bit_depth, 2),
|
||||
component(row, x, 1, bit_depth, 2));
|
||||
component(row, x, 1, bit_depth, 2));
|
||||
return;
|
||||
|
||||
case PNG_COLOR_TYPE_RGB_ALPHA:
|
||||
printf("RGBA %u %u %u %u\n", component(row, x, 0, bit_depth, 4),
|
||||
component(row, x, 1, bit_depth, 4),
|
||||
component(row, x, 2, bit_depth, 4),
|
||||
component(row, x, 3, bit_depth, 4));
|
||||
component(row, x, 1, bit_depth, 4),
|
||||
component(row, x, 2, bit_depth, 4),
|
||||
component(row, x, 3, bit_depth, 4));
|
||||
return;
|
||||
|
||||
default:
|
||||
@ -138,7 +143,8 @@ print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row,
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
int
|
||||
main(int argc, const char **argv)
|
||||
{
|
||||
/* This program uses the default, <setjmp.h> based, libpng error handling
|
||||
* mechanism, therefore any local variable that exists before the call to
|
||||
@ -146,7 +152,7 @@ int main(int argc, const char **argv)
|
||||
* be declared with 'volatile' to ensure that their values don't get
|
||||
* destroyed by longjmp:
|
||||
*/
|
||||
volatile int result = 1/*fail*/;
|
||||
volatile int result = 1 /*fail*/;
|
||||
|
||||
if (argc == 4)
|
||||
{
|
||||
@ -163,8 +169,8 @@ int main(int argc, const char **argv)
|
||||
* writes error messages to stderr. Creating the png_struct is a
|
||||
* little tricky; just copy the following code.
|
||||
*/
|
||||
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
|
||||
NULL, NULL, NULL);
|
||||
png_structp png_ptr =
|
||||
png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
|
||||
if (png_ptr != NULL)
|
||||
{
|
||||
@ -184,11 +190,11 @@ int main(int argc, const char **argv)
|
||||
compression_method, filter_method;
|
||||
png_bytep row_tmp;
|
||||
|
||||
/* Now associate the recently opened (FILE*) with the default
|
||||
* libpng initialization functions. Sometimes libpng is
|
||||
* compiled without stdio support (it can be difficult to do
|
||||
* in some environments); in that case you will have to write
|
||||
* your own read callback to read data from the (FILE*).
|
||||
/* Now associate the recently opened FILE object with the
|
||||
* default libpng initialization functions. Sometimes libpng
|
||||
* is compiled without stdio support (it can be difficult to
|
||||
* do in some environments); in that case you will have to
|
||||
* write your own read callback to read data from the stream.
|
||||
*/
|
||||
png_init_io(png_ptr, f);
|
||||
|
||||
@ -202,21 +208,21 @@ int main(int argc, const char **argv)
|
||||
* space. In this case png_malloc is used - it will not
|
||||
* return if memory isn't available.
|
||||
*/
|
||||
row = png_malloc(png_ptr, png_get_rowbytes(png_ptr,
|
||||
info_ptr));
|
||||
row =
|
||||
png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr));
|
||||
|
||||
/* To avoid the overhead of using a volatile auto copy row_tmp
|
||||
/* Avoid the overhead of using a volatile auto copy row_tmp
|
||||
* to a local here - just use row for the png_free below.
|
||||
*/
|
||||
row_tmp = row;
|
||||
|
||||
/* All the information we need is in the header is returned by
|
||||
* png_get_IHDR, if this fails we can now use 'png_error' to
|
||||
/* All the information we need is in the header returned by
|
||||
* png_get_IHDR. If this fails, we can use 'png_error' to
|
||||
* signal the error and return control to the setjmp above.
|
||||
*/
|
||||
if (png_get_IHDR(png_ptr, info_ptr, &width, &height,
|
||||
&bit_depth, &color_type, &interlace_method,
|
||||
&compression_method, &filter_method))
|
||||
&bit_depth, &color_type, &interlace_method,
|
||||
&compression_method, &filter_method))
|
||||
{
|
||||
int passes, pass;
|
||||
|
||||
@ -242,7 +248,7 @@ int main(int argc, const char **argv)
|
||||
/* Now read the pixels, pass-by-pass, row-by-row: */
|
||||
png_start_read_image(png_ptr);
|
||||
|
||||
for (pass=0; pass<passes; ++pass)
|
||||
for (pass = 0; pass < passes; ++pass)
|
||||
{
|
||||
png_uint_32 ystart, xstart, ystep, xstep;
|
||||
png_uint_32 py;
|
||||
@ -299,19 +305,27 @@ int main(int argc, const char **argv)
|
||||
* are, of course, much better ways of doing this
|
||||
* than using a for loop:
|
||||
*/
|
||||
if (y == py) for (px = xstart, ppx = 0;
|
||||
px < width; px += xstep, ++ppx) if (x == px)
|
||||
if (y == py)
|
||||
{
|
||||
/* 'ppx' is the index of the pixel in the row
|
||||
* buffer.
|
||||
*/
|
||||
print_pixel(png_ptr, info_ptr, row_tmp, ppx);
|
||||
for (px = xstart, ppx = 0;
|
||||
px < width;
|
||||
px += xstep, ++ppx)
|
||||
{
|
||||
if (x == px)
|
||||
{
|
||||
/* 'ppx' is the index of the pixel in the
|
||||
* row buffer.
|
||||
*/
|
||||
print_pixel(png_ptr, info_ptr, row_tmp,
|
||||
ppx);
|
||||
|
||||
/* Now terminate the loops early - we have
|
||||
* found and handled the required data.
|
||||
*/
|
||||
goto pass_loop_end;
|
||||
} /* x loop */
|
||||
/* Now terminate the loops early - we have
|
||||
* found and handled the required data.
|
||||
*/
|
||||
goto pass_loop_end;
|
||||
} /* x loop */
|
||||
}
|
||||
}
|
||||
} /* y loop */
|
||||
} /* pass loop */
|
||||
|
||||
@ -323,7 +337,6 @@ int main(int argc, const char **argv)
|
||||
|
||||
else
|
||||
png_error(png_ptr, "pngpixel: png_get_IHDR failed");
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
@ -349,7 +362,8 @@ int main(int argc, const char **argv)
|
||||
}
|
||||
|
||||
else
|
||||
fprintf(stderr, "pngpixel: out of memory allocating png_info\n");
|
||||
fprintf(stderr,
|
||||
"pngpixel: out of memory allocating png_info\n");
|
||||
|
||||
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
||||
}
|
||||
@ -368,4 +382,3 @@ int main(int argc, const char **argv)
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif /* READ && SEQUENTIAL_READ */
|
||||
|
@ -8,8 +8,8 @@
|
||||
* Read a PNG and write it out in a fixed format, using the 'simplified API'
|
||||
* that was introduced in libpng-1.6.0.
|
||||
*
|
||||
* This sample code is just the code from the top of 'example.c' with some error
|
||||
* handling added. See example.c for more comments.
|
||||
* This sample code is just the code from 'example.c' with some error handling
|
||||
* added. See example.c in the top-level libpng directory for more comments.
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
@ -20,10 +20,15 @@
|
||||
* ensure the code picks up the local libpng implementation:
|
||||
*/
|
||||
#include "../../png.h"
|
||||
#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) && \
|
||||
defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
#if !defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \
|
||||
!defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
|
||||
#error This program requires libpng supporting the simplified read/write API
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
main(int argc, const char **argv)
|
||||
{
|
||||
int result = 1;
|
||||
|
||||
@ -48,22 +53,22 @@ int main(int argc, const char **argv)
|
||||
|
||||
if (buffer != NULL)
|
||||
{
|
||||
if (png_image_finish_read(&image, NULL/*background*/, buffer,
|
||||
0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */))
|
||||
if (png_image_finish_read(&image, NULL /*background*/, buffer,
|
||||
0 /*row_stride*/, NULL /*colormap */))
|
||||
{
|
||||
if (png_image_write_to_file(&image, argv[2],
|
||||
0/*convert_to_8bit*/, buffer, 0/*row_stride*/,
|
||||
NULL/*colormap*/))
|
||||
if (png_image_write_to_file(
|
||||
&image, argv[2], 0 /*convert_to_8bit*/, buffer,
|
||||
0 /*row_stride*/, NULL /*colormap*/))
|
||||
result = 0;
|
||||
|
||||
else
|
||||
fprintf(stderr, "pngtopng: write %s: %s\n", argv[2],
|
||||
image.message);
|
||||
image.message);
|
||||
}
|
||||
|
||||
else
|
||||
fprintf(stderr, "pngtopng: read %s: %s\n", argv[1],
|
||||
image.message);
|
||||
image.message);
|
||||
|
||||
free(buffer);
|
||||
}
|
||||
@ -71,7 +76,7 @@ int main(int argc, const char **argv)
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "pngtopng: out of memory: %lu bytes\n",
|
||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||
|
||||
/* This is the only place where a 'free' is required; libpng does
|
||||
* the cleanup on error and success, but in this case we couldn't
|
||||
@ -93,4 +98,3 @@ int main(int argc, const char **argv)
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif /* READ && WRITE */
|
||||
|
@ -6,9 +6,9 @@
|
||||
* United States.
|
||||
*
|
||||
* Read several PNG files, which should have an alpha channel or transparency
|
||||
* information, and composite them together to produce one or more 16-bit linear
|
||||
* RGBA intermediates. This involves doing the correct 'over' composition to
|
||||
* combine the alpha channels and corresponding data.
|
||||
* information, and composite them together to produce one or more 16-bit
|
||||
* linear RGBA intermediates. This involves doing the 'over' compositing
|
||||
* operation to combine the alpha channels and corresponding data.
|
||||
*
|
||||
* Finally read an output (background) PNG using the 24-bit RGB format (the
|
||||
* PNG will be composited on green (#00ff00) by default if it has an alpha
|
||||
@ -28,8 +28,8 @@
|
||||
* correctly. Apart from the libpng Simplified API the only work done in here
|
||||
* is to combine multiple input PNG images into a single sprite; this involves
|
||||
* a Porter-Duff 'over' operation and the input PNG images may, as a result,
|
||||
* be regarded as being layered one on top of the other with the first (leftmost
|
||||
* on the command line) being at the bottom and the last on the top.
|
||||
* be regarded as being layered one on top of the other with the first
|
||||
* (leftmost on the command line) being at the bottom and the last on the top.
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
@ -44,54 +44,61 @@
|
||||
*/
|
||||
#include "../../png.h"
|
||||
|
||||
#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
|
||||
#if !defined(PNG_SIMPLIFIED_READ_SUPPORTED)
|
||||
#error This program requires libpng supporting the simplified read API
|
||||
#endif
|
||||
|
||||
#define sprite_name_chars 15
|
||||
struct sprite {
|
||||
FILE *file;
|
||||
png_uint_16p buffer;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
char name[sprite_name_chars+1];
|
||||
struct sprite
|
||||
{
|
||||
FILE *file;
|
||||
png_uint_16p buffer;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
char name[sprite_name_chars + 1];
|
||||
};
|
||||
|
||||
#if 0 /* div by 65535 test program */
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
double err = 0;
|
||||
unsigned int xerr = 0;
|
||||
unsigned int r = 32769;
|
||||
unsigned int x = 0;
|
||||
|
||||
do
|
||||
{
|
||||
unsigned int x = 0;
|
||||
unsigned int t = x + (x >> 16) /*+ (x >> 31)*/ + r;
|
||||
double v = x, errtest;
|
||||
|
||||
do {
|
||||
unsigned int t = x + (x >> 16) /*+ (x >> 31)*/ + r;
|
||||
double v = x, errtest;
|
||||
if (t < x)
|
||||
{
|
||||
fprintf(stderr, "overflow: %u+%u -> %u\n", x, r, t);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (t < x) {
|
||||
fprintf(stderr, "overflow: %u+%u -> %u\n", x, r, t);
|
||||
return 1;
|
||||
v /= 65535;
|
||||
errtest = v;
|
||||
t >>= 16;
|
||||
errtest -= t;
|
||||
|
||||
if (errtest > err)
|
||||
{
|
||||
err = errtest;
|
||||
xerr = x;
|
||||
|
||||
if (errtest >= .5)
|
||||
{
|
||||
fprintf(stderr, "error: %u/65535 = %f, not %u, error %f\n",
|
||||
x, v, t, errtest);
|
||||
return 0;
|
||||
}
|
||||
|
||||
v /= 65535;
|
||||
errtest = v;
|
||||
t >>= 16;
|
||||
errtest -= t;
|
||||
|
||||
if (errtest > err) {
|
||||
err = errtest;
|
||||
xerr = x;
|
||||
|
||||
if (errtest >= .5) {
|
||||
fprintf(stderr, "error: %u/65535 = %f, not %u, error %f\n",
|
||||
x, v, t, errtest);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} while (++x <= 65535U*65535U);
|
||||
}
|
||||
}
|
||||
} while (++x <= 65535U * 65535U);
|
||||
|
||||
printf("error %f @ %u\n", err, xerr);
|
||||
|
||||
@ -101,7 +108,7 @@ int main(void) {
|
||||
|
||||
static void
|
||||
sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
||||
png_imagep image, const png_uint_16 *buffer)
|
||||
png_imagep image, const png_uint_16 *buffer)
|
||||
{
|
||||
/* This is where the Porter-Duff 'Over' operator is evaluated; change this
|
||||
* code to change the operator (this could be parameterized). Any other
|
||||
@ -112,8 +119,8 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
||||
/* Check for an x or y offset that pushes any part of the image beyond the
|
||||
* right or bottom of the sprite:
|
||||
*/
|
||||
if ((y_offset < 0 || (unsigned)/*SAFE*/y_offset < sprite->height) &&
|
||||
(x_offset < 0 || (unsigned)/*SAFE*/x_offset < sprite->width))
|
||||
if ((y_offset < 0 || /*SAFE*/ (unsigned)y_offset < sprite->height) &&
|
||||
(x_offset < 0 || /*SAFE*/ (unsigned)x_offset < sprite->width))
|
||||
{
|
||||
unsigned int y = 0;
|
||||
|
||||
@ -130,7 +137,7 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
||||
do
|
||||
{
|
||||
/* In and out are RGBA values, so: */
|
||||
const png_uint_16 *in_pixel = buffer + (y * image->width + x)*4;
|
||||
const png_uint_16 *in_pixel = buffer + (y * image->width + x) * 4;
|
||||
png_uint_32 in_alpha = in_pixel[3];
|
||||
|
||||
/* This is the optimized Porter-Duff 'Over' operation, when the
|
||||
@ -139,10 +146,10 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
||||
if (in_alpha > 0)
|
||||
{
|
||||
png_uint_16 *out_pixel = sprite->buffer +
|
||||
((y+y_offset) * sprite->width + (x+x_offset))*4;
|
||||
((y + y_offset) * sprite->width + (x + x_offset)) * 4;
|
||||
|
||||
/* This is the weight to apply to the output: */
|
||||
in_alpha = 65535-in_alpha;
|
||||
in_alpha = 65535 - in_alpha;
|
||||
|
||||
if (in_alpha > 0)
|
||||
{
|
||||
@ -159,9 +166,9 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
||||
*/
|
||||
png_uint_32 tmp;
|
||||
|
||||
# define compose(c)\
|
||||
tmp = out_pixel[c] * in_alpha;\
|
||||
tmp = (tmp + (tmp >> 16) + 32769) >> 16;\
|
||||
# define compose(c) \
|
||||
tmp = out_pixel[c] * in_alpha; \
|
||||
tmp = (tmp + (tmp >> 16) + 32769) >> 16; \
|
||||
out_pixel[c] = tmp + in_pixel[c]
|
||||
|
||||
/* The following is very vectorizable... */
|
||||
@ -172,15 +179,15 @@ sprite_op(const struct sprite *sprite, int x_offset, int y_offset,
|
||||
}
|
||||
|
||||
else
|
||||
out_pixel[0] = in_pixel[0],
|
||||
out_pixel[1] = in_pixel[1],
|
||||
out_pixel[2] = in_pixel[2],
|
||||
{
|
||||
out_pixel[0] = in_pixel[0];
|
||||
out_pixel[1] = in_pixel[1];
|
||||
out_pixel[2] = in_pixel[2];
|
||||
out_pixel[3] = in_pixel[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
while (++x < image->width);
|
||||
}
|
||||
while (++y < image->height);
|
||||
} while (++x < image->width);
|
||||
} while (++y < image->height);
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,9 +231,8 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
||||
|
||||
if (buffer != NULL)
|
||||
{
|
||||
if (png_image_finish_read(&image, NULL/*background*/, buffer,
|
||||
0/*row_stride*/,
|
||||
NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP*/))
|
||||
if (png_image_finish_read(&image, NULL /*background*/, buffer,
|
||||
0 /*row_stride*/, NULL /*colormap*/))
|
||||
{
|
||||
/* This is the place where the Porter-Duff 'Over' operator
|
||||
* needs to be done by this code. In fact, any image
|
||||
@ -245,14 +251,14 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
||||
{
|
||||
free(buffer);
|
||||
fprintf(stderr, "simpleover: read %s: %s\n", (*argv)[0],
|
||||
image.message);
|
||||
image.message);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "simpleover: out of memory: %lu bytes\n",
|
||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||
|
||||
/* png_image_free must be called if we abort the Simplified API
|
||||
* read because of a problem detected in this code. If problems
|
||||
@ -290,8 +296,9 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
||||
save.flags = PNG_IMAGE_FLAG_FAST;
|
||||
save.colormap_entries = 0;
|
||||
|
||||
if (png_image_write_to_stdio(&save, sprite->file, 1/*convert_to_8_bit*/,
|
||||
sprite->buffer, 0/*row_stride*/, NULL/*colormap*/))
|
||||
if (png_image_write_to_stdio(&save, sprite->file, 1 /*convert_to_8_bit*/,
|
||||
sprite->buffer, 0 /*row_stride*/,
|
||||
NULL /*colormap*/))
|
||||
{
|
||||
/* Success; the buffer is no longer needed: */
|
||||
free(sprite->buffer);
|
||||
@ -301,19 +308,20 @@ create_sprite(struct sprite *sprite, int *argc, const char ***argv)
|
||||
|
||||
else
|
||||
fprintf(stderr, "simpleover: write sprite %s: %s\n", sprite->name,
|
||||
save.message);
|
||||
save.message);
|
||||
}
|
||||
|
||||
else
|
||||
fprintf(stderr, "simpleover: sprite %s: could not allocate tmpfile: %s\n",
|
||||
sprite->name, strerror(errno));
|
||||
fprintf(stderr,
|
||||
"simpleover: sprite %s: could not allocate tmpfile: %s\n",
|
||||
sprite->name, strerror(errno));
|
||||
|
||||
return 0; /* fail */
|
||||
}
|
||||
|
||||
static int
|
||||
add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
||||
int *argc, const char ***argv)
|
||||
int *argc, const char ***argv)
|
||||
{
|
||||
/* Given a --add argument naming this sprite, perform the operations listed
|
||||
* in the following arguments. The arguments are expected to have the form
|
||||
@ -334,13 +342,13 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
||||
* will fit.
|
||||
*/
|
||||
if (x < 0 || y < 0 ||
|
||||
(unsigned)/*SAFE*/x >= output->width ||
|
||||
(unsigned)/*SAFE*/y >= output->height ||
|
||||
sprite->width > output->width-x ||
|
||||
sprite->height > output->height-y)
|
||||
/*SAFE*/ (unsigned)x >= output->width ||
|
||||
/*SAFE*/ (unsigned)y >= output->height ||
|
||||
sprite->width > output->width - x ||
|
||||
sprite->height > output->height - y)
|
||||
{
|
||||
fprintf(stderr, "simpleover: sprite %s @ (%d,%d) outside image\n",
|
||||
sprite->name, x, y);
|
||||
sprite->name, x, y);
|
||||
/* Could just skip this, but for the moment it is an error */
|
||||
return 0; /* error */
|
||||
}
|
||||
@ -359,10 +367,10 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
||||
{
|
||||
in.format = PNG_FORMAT_RGB; /* force compose */
|
||||
|
||||
if (png_image_finish_read(&in, NULL/*background*/,
|
||||
out_buf + (y*output->width + x)*3/*RGB*/,
|
||||
output->width*3/*row_stride*/,
|
||||
NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP*/))
|
||||
if (png_image_finish_read(
|
||||
&in, NULL /*background*/,
|
||||
out_buf + (y * output->width + x) * 3 /*RGB*/,
|
||||
output->width * 3 /*row_stride*/, NULL /*colormap*/))
|
||||
{
|
||||
++*argv, --*argc;
|
||||
continue;
|
||||
@ -371,7 +379,7 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
||||
|
||||
/* The read failed: */
|
||||
fprintf(stderr, "simpleover: add sprite %s: %s\n", sprite->name,
|
||||
in.message);
|
||||
in.message);
|
||||
return 0; /* error */
|
||||
}
|
||||
}
|
||||
@ -379,7 +387,7 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "simpleover: --add='%s': invalid position %s\n",
|
||||
sprite->name, (*argv)[0]);
|
||||
sprite->name, (*argv)[0]);
|
||||
return 0; /* error */
|
||||
}
|
||||
}
|
||||
@ -389,10 +397,10 @@ add_sprite(png_imagep output, png_bytep out_buf, struct sprite *sprite,
|
||||
|
||||
static int
|
||||
simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||
const char **argv)
|
||||
const char **argv)
|
||||
{
|
||||
int result = 1; /* success */
|
||||
# define csprites 10/*limit*/
|
||||
# define csprites 10 /*limit*/
|
||||
# define str(a) #a
|
||||
int nsprites = 0;
|
||||
struct sprite sprites[csprites];
|
||||
@ -412,23 +420,25 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||
sprites[nsprites].width = sprites[nsprites].height = 0;
|
||||
sprites[nsprites].name[0] = 0;
|
||||
|
||||
n = sscanf(argv[0], "--sprite=%u,%u,%" str(sprite_name_chars) "s%c",
|
||||
&sprites[nsprites].width, &sprites[nsprites].height,
|
||||
sprites[nsprites].name, &tombstone);
|
||||
n = sscanf(argv[0],
|
||||
"--sprite=%u,%u,%" str(sprite_name_chars) "s%c",
|
||||
&sprites[nsprites].width, &sprites[nsprites].height,
|
||||
sprites[nsprites].name, &tombstone);
|
||||
|
||||
if ((n == 2 || n == 3) &&
|
||||
sprites[nsprites].width > 0 && sprites[nsprites].height > 0)
|
||||
(sprites[nsprites].width > 0) &&
|
||||
(sprites[nsprites].height > 0))
|
||||
{
|
||||
size_t buf_size, tmp;
|
||||
|
||||
/* Default a name if not given. */
|
||||
if (sprites[nsprites].name[0] == 0)
|
||||
sprintf(sprites[nsprites].name, "sprite-%d", nsprites+1);
|
||||
sprintf(sprites[nsprites].name, "sprite-%d", nsprites + 1);
|
||||
|
||||
/* Allocate a buffer for the sprite and calculate the buffer
|
||||
* size:
|
||||
*/
|
||||
buf_size = sizeof (png_uint_16 [4]);
|
||||
buf_size = sizeof(png_uint_16[4]);
|
||||
buf_size *= sprites[nsprites].width;
|
||||
buf_size *= sprites[nsprites].height;
|
||||
|
||||
@ -437,7 +447,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||
tmp /= sprites[nsprites].width;
|
||||
tmp /= sprites[nsprites].height;
|
||||
|
||||
if (tmp == sizeof (png_uint_16 [4]))
|
||||
if (tmp == sizeof(png_uint_16[4]))
|
||||
{
|
||||
sprites[nsprites].buffer = malloc(buf_size);
|
||||
/* This buffer must be initialized to transparent: */
|
||||
@ -448,7 +458,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||
sprites[nsprites].file = NULL;
|
||||
++argv, --argc;
|
||||
|
||||
if (create_sprite(sprites+nsprites++, &argc, &argv))
|
||||
if (create_sprite(sprites + nsprites++, &argc, &argv))
|
||||
{
|
||||
result = 1; /* still ok */
|
||||
continue;
|
||||
@ -466,7 +476,8 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "simpleover: %s: invalid sprite (%u,%u)\n",
|
||||
argv[0], sprites[nsprites].width, sprites[nsprites].height);
|
||||
argv[0],
|
||||
sprites[nsprites].width, sprites[nsprites].height);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -480,7 +491,7 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||
|
||||
else if (strncmp(argv[0], "--add=", 6) == 0)
|
||||
{
|
||||
const char *name = argv[0]+6;
|
||||
const char *name = argv[0] + 6;
|
||||
int isprite = nsprites;
|
||||
|
||||
++argv, --argc;
|
||||
@ -489,7 +500,8 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||
{
|
||||
if (strcmp(sprites[isprite].name, name) == 0)
|
||||
{
|
||||
if (!add_sprite(output, out_buf, sprites+isprite, &argc, &argv))
|
||||
if (!add_sprite(output, out_buf, sprites + isprite,
|
||||
&argc, &argv))
|
||||
goto out; /* error in add_sprite */
|
||||
|
||||
break;
|
||||
@ -498,7 +510,8 @@ simpleover_process(png_imagep output, png_bytep out_buf, int argc,
|
||||
|
||||
if (isprite < 0) /* sprite not found */
|
||||
{
|
||||
fprintf(stderr, "simpleover: --add='%s': sprite not found\n", name);
|
||||
fprintf(stderr, "simpleover: --add='%s': sprite not found\n",
|
||||
name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -526,7 +539,8 @@ out:
|
||||
return result;
|
||||
}
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
int
|
||||
main(int argc, const char **argv)
|
||||
{
|
||||
int result = 1; /* default to fail */
|
||||
|
||||
@ -536,7 +550,7 @@ int main(int argc, const char **argv)
|
||||
const char *output = NULL;
|
||||
png_image image;
|
||||
|
||||
if (argc > 2 && argv[2][0] != '-'/*an operation*/)
|
||||
if (argc > 2 && argv[2][0] != '-' /*an operation*/)
|
||||
{
|
||||
output = argv[2];
|
||||
argi = 3;
|
||||
@ -558,7 +572,7 @@ int main(int argc, const char **argv)
|
||||
png_color background = {0, 0xff, 0}; /* fully saturated green */
|
||||
|
||||
if (png_image_finish_read(&image, &background, buffer,
|
||||
0/*row_stride*/, NULL/*colormap for PNG_FORMAT_FLAG_COLORMAP */))
|
||||
0 /*row_stride*/, NULL /*colormap*/))
|
||||
{
|
||||
/* At this point png_image_finish_read has cleaned up the
|
||||
* allocated data in png_image, and only the buffer needs to be
|
||||
@ -566,22 +580,24 @@ int main(int argc, const char **argv)
|
||||
*
|
||||
* Perform the remaining operations:
|
||||
*/
|
||||
if (simpleover_process(&image, buffer, argc-argi, argv+argi))
|
||||
if (simpleover_process(&image, buffer,
|
||||
argc - argi, argv + argi))
|
||||
{
|
||||
/* Write the output: */
|
||||
if ((output != NULL &&
|
||||
png_image_write_to_file(&image, output,
|
||||
0/*convert_to_8bit*/, buffer, 0/*row_stride*/,
|
||||
NULL/*colormap*/)) ||
|
||||
png_image_write_to_file(
|
||||
&image, output, 0 /*convert_to_8bit*/, buffer,
|
||||
0 /*row_stride*/, NULL /*colormap*/)) ||
|
||||
(output == NULL &&
|
||||
png_image_write_to_stdio(&image, stdout,
|
||||
0/*convert_to_8bit*/, buffer, 0/*row_stride*/,
|
||||
NULL/*colormap*/)))
|
||||
png_image_write_to_stdio(
|
||||
&image, stdout, 0 /*convert_to_8bit*/, buffer,
|
||||
0 /*row_stride*/, NULL /*colormap*/)))
|
||||
result = 0;
|
||||
|
||||
else
|
||||
fprintf(stderr, "simpleover: write %s: %s\n",
|
||||
output == NULL ? "stdout" : output, image.message);
|
||||
output == NULL ? "stdout" : output,
|
||||
image.message);
|
||||
}
|
||||
|
||||
/* else simpleover_process writes an error message */
|
||||
@ -589,7 +605,7 @@ int main(int argc, const char **argv)
|
||||
|
||||
else
|
||||
fprintf(stderr, "simpleover: read %s: %s\n", argv[1],
|
||||
image.message);
|
||||
image.message);
|
||||
|
||||
free(buffer);
|
||||
}
|
||||
@ -597,7 +613,7 @@ int main(int argc, const char **argv)
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "simpleover: out of memory: %lu bytes\n",
|
||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||
(unsigned long)PNG_IMAGE_SIZE(image));
|
||||
|
||||
/* This is the only place where a 'free' is required; libpng does
|
||||
* the cleanup on error and success, but in this case we couldn't
|
||||
@ -617,7 +633,8 @@ int main(int argc, const char **argv)
|
||||
else
|
||||
{
|
||||
/* Usage message */
|
||||
fprintf(stderr,
|
||||
fprintf(
|
||||
stderr,
|
||||
"simpleover: usage: simpleover background.png [output.png]\n"
|
||||
" Output 'background.png' as a 24-bit RGB PNG file in 'output.png'\n"
|
||||
" or, if not given, stdout. 'background.png' will be composited\n"
|
||||
@ -628,13 +645,13 @@ int main(int argc, const char **argv)
|
||||
" --sprite=width,height,name {[--at=x,y] {sprite.png}}\n"
|
||||
" Produce a transparent sprite of size (width,height) and with\n"
|
||||
" name 'name'.\n"
|
||||
" For each sprite.png composite it using a Porter-Duff 'Over'\n"
|
||||
" operation at offset (x,y) in the sprite (defaulting to (0,0)).\n"
|
||||
" For each sprite.png composite it is using a Porter-Duff 'Over'\n"
|
||||
" operation at offset (x,y) in the sprite, defaulting to (0,0).\n"
|
||||
" Input PNGs will be truncated to the area of the sprite.\n"
|
||||
"\n"
|
||||
" --add='name' {x,y}\n"
|
||||
" Optionally, before output, composite a sprite, 'name', which\n"
|
||||
" must have been previously produced using --sprite, at each\n"
|
||||
" must have been previously produced using --sprite at each\n"
|
||||
" offset (x,y) in the output image. Each sprite must fit\n"
|
||||
" completely within the output image.\n"
|
||||
"\n"
|
||||
@ -645,4 +662,3 @@ int main(int argc, const char **argv)
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif /* SIMPLIFIED_READ */
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* pngimage.c
|
||||
*
|
||||
* Copyright (c) 2021 Cosmin Truta
|
||||
@ -543,6 +542,7 @@ typedef enum
|
||||
struct display
|
||||
{
|
||||
jmp_buf error_return; /* Where to go to on error */
|
||||
error_level error_code; /* Set before longjmp */
|
||||
|
||||
const char *filename; /* The name of the original file */
|
||||
const char *operation; /* Operation being performed */
|
||||
@ -763,7 +763,10 @@ display_log(struct display *dp, error_level level, const char *fmt, ...)
|
||||
|
||||
/* Errors cause this routine to exit to the fail code */
|
||||
if (level > APP_FAIL || (level > ERRORS && !(dp->options & CONTINUE)))
|
||||
{
|
||||
dp->error_code = level;
|
||||
longjmp(dp->error_return, level);
|
||||
}
|
||||
}
|
||||
|
||||
/* error handler callbacks for libpng */
|
||||
@ -1019,7 +1022,12 @@ compare_read(struct display *dp, int applied_transforms)
|
||||
C(height);
|
||||
C(bit_depth);
|
||||
C(color_type);
|
||||
C(interlace_method);
|
||||
# ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
||||
/* If write interlace has been disabled, the PNG file is still
|
||||
* written correctly, but as a regular (not-interlaced) PNG.
|
||||
*/
|
||||
C(interlace_method);
|
||||
# endif
|
||||
C(compression_method);
|
||||
C(filter_method);
|
||||
|
||||
@ -1566,18 +1574,19 @@ static int
|
||||
do_test(struct display *dp, const char *file)
|
||||
/* Exists solely to isolate the setjmp clobbers */
|
||||
{
|
||||
int ret = setjmp(dp->error_return);
|
||||
dp->error_code = VERBOSE; /* The "lowest" level */
|
||||
|
||||
if (ret == 0)
|
||||
if (setjmp(dp->error_return) == 0)
|
||||
{
|
||||
test_one_file(dp, file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
else if (ret < ERRORS) /* shouldn't longjmp on warnings */
|
||||
display_log(dp, INTERNAL_ERROR, "unexpected return code %d", ret);
|
||||
else if (dp->error_code < ERRORS) /* shouldn't longjmp on warnings */
|
||||
display_log(dp, INTERNAL_ERROR, "unexpected return code %d",
|
||||
dp->error_code);
|
||||
|
||||
return ret;
|
||||
return dp->error_code;
|
||||
}
|
||||
|
||||
int
|
||||
@ -1677,7 +1686,11 @@ main(int argc, char **argv)
|
||||
int ret = do_test(&d, argv[i]);
|
||||
|
||||
if (ret > QUIET) /* abort on user or internal error */
|
||||
{
|
||||
display_clean(&d);
|
||||
display_destroy(&d);
|
||||
return 99;
|
||||
}
|
||||
}
|
||||
|
||||
/* Here on any return, including failures, except user/internal issues
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* pngstest.c
|
||||
*
|
||||
* Copyright (c) 2021 Cosmin Truta
|
||||
@ -596,7 +595,8 @@ newimage(Image *image)
|
||||
memset(image, 0, sizeof *image);
|
||||
}
|
||||
|
||||
/* Reset the image to be read again - only needs to rewind the FILE* at present.
|
||||
/* Reset the image to be read again - only needs to rewind the FILE object at
|
||||
* present.
|
||||
*/
|
||||
static void
|
||||
resetimage(Image *image)
|
||||
@ -3500,7 +3500,7 @@ main(int argc, char **argv)
|
||||
int retval = 0;
|
||||
int c;
|
||||
|
||||
#if PNG_LIBPNG_VER >= 10700
|
||||
#if PNG_LIBPNG_VER == 10700
|
||||
/* This error should not exist in 1.7 or later: */
|
||||
opts |= GBG_ERROR;
|
||||
#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* pngunknown.c - test the read side unknown chunk handling
|
||||
*
|
||||
* Copyright (c) 2021 Cosmin Truta
|
||||
@ -114,6 +113,8 @@ typedef png_byte *png_const_bytep;
|
||||
#define png_PLTE PNG_U32( 80, 76, 84, 69)
|
||||
#define png_bKGD PNG_U32( 98, 75, 71, 68)
|
||||
#define png_cHRM PNG_U32( 99, 72, 82, 77)
|
||||
#define png_cICP PNG_U32( 99, 73, 67, 80) /* PNGv3 */
|
||||
#define png_cLLI PNG_U32( 99, 76, 76, 73) /* PNGv3 */
|
||||
#define png_eXIf PNG_U32(101, 88, 73, 102) /* registered July 2017 */
|
||||
#define png_fRAc PNG_U32(102, 82, 65, 99) /* registered, not defined */
|
||||
#define png_gAMA PNG_U32(103, 65, 77, 65)
|
||||
@ -123,6 +124,7 @@ typedef png_byte *png_const_bytep;
|
||||
#define png_hIST PNG_U32(104, 73, 83, 84)
|
||||
#define png_iCCP PNG_U32(105, 67, 67, 80)
|
||||
#define png_iTXt PNG_U32(105, 84, 88, 116)
|
||||
#define png_mDCV PNG_U32(109, 68, 67, 86) /* PNGv3 */
|
||||
#define png_oFFs PNG_U32(111, 70, 70, 115)
|
||||
#define png_pCAL PNG_U32(112, 67, 65, 76)
|
||||
#define png_pHYs PNG_U32(112, 72, 89, 115)
|
||||
@ -209,6 +211,20 @@ static struct
|
||||
0,
|
||||
# else
|
||||
1,
|
||||
# endif
|
||||
1, START, 0 },
|
||||
{ "cICP", PNG_INFO_cICP, png_cICP,
|
||||
# ifdef PNG_READ_cICP_SUPPORTED
|
||||
0,
|
||||
# else
|
||||
1,
|
||||
# endif
|
||||
1, START, 0 },
|
||||
{ "cLLI", PNG_INFO_cLLI, png_cLLI,
|
||||
# ifdef PNG_READ_cLLI_SUPPORTED
|
||||
0,
|
||||
# else
|
||||
1,
|
||||
# endif
|
||||
1, START, 0 },
|
||||
{ "eXIf", PNG_INFO_eXIf, png_eXIf,
|
||||
@ -246,6 +262,13 @@ static struct
|
||||
1,
|
||||
# endif
|
||||
1, ABSENT, 0 },
|
||||
{ "mDCV", PNG_INFO_mDCV, png_mDCV,
|
||||
# ifdef PNG_READ_mDCV_SUPPORTED
|
||||
0,
|
||||
# else
|
||||
1,
|
||||
# endif
|
||||
1, START, 0 },
|
||||
{ "oFFs", PNG_INFO_oFFs, png_oFFs,
|
||||
# ifdef PNG_READ_oFFs_SUPPORTED
|
||||
0,
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* pngvalid.c - validate libpng by constructing then reading png files.
|
||||
*
|
||||
* Copyright (c) 2021 Cosmin Truta
|
||||
@ -304,20 +303,20 @@ make_four_random_bytes(png_uint_32* seed, png_bytep bytes)
|
||||
#if defined PNG_READ_SUPPORTED || defined PNG_WRITE_tRNS_SUPPORTED ||\
|
||||
defined PNG_WRITE_FILTER_SUPPORTED
|
||||
static void
|
||||
randomize(void *pv, size_t size)
|
||||
randomize_bytes(void *pv, size_t size)
|
||||
{
|
||||
static png_uint_32 random_seed[2] = {0x56789abc, 0xd};
|
||||
make_random_bytes(random_seed, pv, size);
|
||||
}
|
||||
|
||||
#define R8(this) randomize(&(this), sizeof (this))
|
||||
#define R8(this) randomize_bytes(&(this), sizeof (this))
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
static png_byte
|
||||
random_byte(void)
|
||||
{
|
||||
unsigned char b1[1];
|
||||
randomize(b1, sizeof b1);
|
||||
randomize_bytes(b1, sizeof b1);
|
||||
return b1[0];
|
||||
}
|
||||
#endif /* READ */
|
||||
@ -326,7 +325,7 @@ static png_uint_16
|
||||
random_u16(void)
|
||||
{
|
||||
unsigned char b2[2];
|
||||
randomize(b2, sizeof b2);
|
||||
randomize_bytes(b2, sizeof b2);
|
||||
return png_get_uint_16(b2);
|
||||
}
|
||||
|
||||
@ -336,7 +335,7 @@ static png_uint_32
|
||||
random_u32(void)
|
||||
{
|
||||
unsigned char b4[4];
|
||||
randomize(b4, sizeof b4);
|
||||
randomize_bytes(b4, sizeof b4);
|
||||
return png_get_uint_32(b4);
|
||||
}
|
||||
#endif /* READ_FILLER || READ_RGB_TO_GRAY */
|
||||
@ -2574,7 +2573,7 @@ modifier_init(png_modifier *pm)
|
||||
* in the rgb_to_gray check, replacing it with an exact copy of the libpng 1.5
|
||||
* algorithm.
|
||||
*/
|
||||
#define DIGITIZE PNG_LIBPNG_VER < 10700
|
||||
#define DIGITIZE PNG_LIBPNG_VER != 10700
|
||||
|
||||
/* If pm->calculations_use_input_precision is set then operations will happen
|
||||
* with the precision of the input, not the precision of the output depth.
|
||||
@ -3986,7 +3985,7 @@ transform_row(png_const_structp pp, png_byte buffer[TRANSFORM_ROWMAX],
|
||||
# define check_interlace_type(type) ((void)(type))
|
||||
# define set_write_interlace_handling(pp,type) png_set_interlace_handling(pp)
|
||||
# define do_own_interlace 0
|
||||
#elif PNG_LIBPNG_VER < 10700
|
||||
#elif PNG_LIBPNG_VER != 10700
|
||||
# define set_write_interlace_handling(pp,type) (1)
|
||||
static void
|
||||
check_interlace_type(int const interlace_type)
|
||||
@ -4014,7 +4013,7 @@ check_interlace_type(int const interlace_type)
|
||||
# define do_own_interlace 1
|
||||
#endif /* WRITE_INTERLACING tests */
|
||||
|
||||
#if PNG_LIBPNG_VER >= 10700 || defined PNG_WRITE_INTERLACING_SUPPORTED
|
||||
#if PNG_LIBPNG_VER == 10700 || defined PNG_WRITE_INTERLACING_SUPPORTED
|
||||
# define CAN_WRITE_INTERLACE 1
|
||||
#else
|
||||
# define CAN_WRITE_INTERLACE 0
|
||||
@ -4633,10 +4632,10 @@ static const struct
|
||||
{
|
||||
/* no warnings makes these errors undetectable prior to 1.7.0 */
|
||||
{ sBIT0_error_fn, "sBIT(0): failed to detect error",
|
||||
PNG_LIBPNG_VER < 10700 },
|
||||
PNG_LIBPNG_VER != 10700 },
|
||||
|
||||
{ sBIT_error_fn, "sBIT(too big): failed to detect error",
|
||||
PNG_LIBPNG_VER < 10700 },
|
||||
PNG_LIBPNG_VER != 10700 },
|
||||
};
|
||||
|
||||
static void
|
||||
@ -6236,7 +6235,7 @@ image_pixel_add_alpha(image_pixel *this, const standard_display *display,
|
||||
{
|
||||
if (this->colour_type == PNG_COLOR_TYPE_GRAY)
|
||||
{
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
if (!for_background && this->bit_depth < 8)
|
||||
this->bit_depth = this->sample_depth = 8;
|
||||
# endif
|
||||
@ -6246,7 +6245,7 @@ image_pixel_add_alpha(image_pixel *this, const standard_display *display,
|
||||
/* After 1.7 the expansion of bit depth only happens if there is a
|
||||
* tRNS chunk to expand at this point.
|
||||
*/
|
||||
# if PNG_LIBPNG_VER >= 10700
|
||||
# if PNG_LIBPNG_VER == 10700
|
||||
if (!for_background && this->bit_depth < 8)
|
||||
this->bit_depth = this->sample_depth = 8;
|
||||
# endif
|
||||
@ -7127,7 +7126,7 @@ image_transform_png_set_tRNS_to_alpha_mod(const image_transform *this,
|
||||
image_pixel *that, png_const_structp pp,
|
||||
const transform_display *display)
|
||||
{
|
||||
#if PNG_LIBPNG_VER < 10700
|
||||
#if PNG_LIBPNG_VER != 10700
|
||||
/* LIBPNG BUG: this always forces palette images to RGB. */
|
||||
if (that->colour_type == PNG_COLOR_TYPE_PALETTE)
|
||||
image_pixel_convert_PLTE(that);
|
||||
@ -7137,13 +7136,13 @@ image_transform_png_set_tRNS_to_alpha_mod(const image_transform *this,
|
||||
* convert to an alpha channel.
|
||||
*/
|
||||
if (that->have_tRNS)
|
||||
# if PNG_LIBPNG_VER >= 10700
|
||||
# if PNG_LIBPNG_VER == 10700
|
||||
if (that->colour_type != PNG_COLOR_TYPE_PALETTE &&
|
||||
(that->colour_type & PNG_COLOR_MASK_ALPHA) == 0)
|
||||
# endif
|
||||
image_pixel_add_alpha(that, &display->this, 0/*!for background*/);
|
||||
|
||||
#if PNG_LIBPNG_VER < 10700
|
||||
#if PNG_LIBPNG_VER != 10700
|
||||
/* LIBPNG BUG: otherwise libpng still expands to 8 bits! */
|
||||
else
|
||||
{
|
||||
@ -7172,7 +7171,7 @@ image_transform_png_set_tRNS_to_alpha_add(image_transform *this,
|
||||
* any action on a palette image.
|
||||
*/
|
||||
return
|
||||
# if PNG_LIBPNG_VER >= 10700
|
||||
# if PNG_LIBPNG_VER == 10700
|
||||
colour_type != PNG_COLOR_TYPE_PALETTE &&
|
||||
# endif
|
||||
(colour_type & PNG_COLOR_MASK_ALPHA) == 0;
|
||||
@ -7313,7 +7312,7 @@ image_transform_png_set_expand_gray_1_2_4_to_8_mod(
|
||||
const image_transform *this, image_pixel *that, png_const_structp pp,
|
||||
const transform_display *display)
|
||||
{
|
||||
#if PNG_LIBPNG_VER < 10700
|
||||
#if PNG_LIBPNG_VER != 10700
|
||||
image_transform_png_set_expand_mod(this, that, pp, display);
|
||||
#else
|
||||
/* Only expand grayscale of bit depth less than 8: */
|
||||
@ -7329,7 +7328,7 @@ static int
|
||||
image_transform_png_set_expand_gray_1_2_4_to_8_add(image_transform *this,
|
||||
const image_transform **that, png_byte colour_type, png_byte bit_depth)
|
||||
{
|
||||
#if PNG_LIBPNG_VER < 10700
|
||||
#if PNG_LIBPNG_VER != 10700
|
||||
return image_transform_png_set_expand_add(this, that, colour_type,
|
||||
bit_depth);
|
||||
#else
|
||||
@ -7359,7 +7358,7 @@ image_transform_png_set_expand_16_set(const image_transform *this,
|
||||
png_set_expand_16(pp);
|
||||
|
||||
/* NOTE: prior to 1.7 libpng does SET_EXPAND as well, so tRNS is expanded. */
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
if (that->this.has_tRNS)
|
||||
that->this.is_transparent = 1;
|
||||
# endif
|
||||
@ -7412,7 +7411,7 @@ image_transform_png_set_scale_16_set(const image_transform *this,
|
||||
transform_display *that, png_structp pp, png_infop pi)
|
||||
{
|
||||
png_set_scale_16(pp);
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
/* libpng will limit the gamma table size: */
|
||||
that->max_gamma_8 = PNG_MAX_GAMMA_8;
|
||||
# endif
|
||||
@ -7460,7 +7459,7 @@ image_transform_png_set_strip_16_set(const image_transform *this,
|
||||
transform_display *that, png_structp pp, png_infop pi)
|
||||
{
|
||||
png_set_strip_16(pp);
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
/* libpng will limit the gamma table size: */
|
||||
that->max_gamma_8 = PNG_MAX_GAMMA_8;
|
||||
# endif
|
||||
@ -7647,7 +7646,7 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this,
|
||||
else
|
||||
{
|
||||
/* The default (built in) coefficients, as above: */
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
data.red_coefficient = 6968 / 32768.;
|
||||
data.green_coefficient = 23434 / 32768.;
|
||||
data.blue_coefficient = 2366 / 32768.;
|
||||
@ -7730,7 +7729,7 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this,
|
||||
* conversion adds another +/-2 in the 16-bit case and
|
||||
* +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case.
|
||||
*/
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
if (that->this.bit_depth < 16)
|
||||
that->max_gamma_8 = PNG_MAX_GAMMA_8;
|
||||
# endif
|
||||
@ -7907,7 +7906,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this,
|
||||
{
|
||||
double gray, err;
|
||||
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
if (that->colour_type == PNG_COLOR_TYPE_PALETTE)
|
||||
image_pixel_convert_PLTE(that);
|
||||
# endif
|
||||
@ -8094,7 +8093,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this,
|
||||
double b = that->bluef;
|
||||
double be = that->bluee;
|
||||
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
/* The true gray case involves no math in earlier versions (not
|
||||
* true, there was some if gamma correction was happening too.)
|
||||
*/
|
||||
@ -9873,7 +9872,7 @@ gamma_component_validate(const char *name, const validate_info *vi,
|
||||
* lost. This can result in up to a +/-1 error in the presence of
|
||||
* an sbit less than the bit depth.
|
||||
*/
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
# define SBIT_ERROR .5
|
||||
# else
|
||||
# define SBIT_ERROR 1.
|
||||
@ -10733,7 +10732,7 @@ static void perform_gamma_scale16_tests(png_modifier *pm)
|
||||
# ifndef PNG_MAX_GAMMA_8
|
||||
# define PNG_MAX_GAMMA_8 11
|
||||
# endif
|
||||
# if defined PNG_MAX_GAMMA_8 || PNG_LIBPNG_VER < 10700
|
||||
# if defined PNG_MAX_GAMMA_8 || PNG_LIBPNG_VER != 10700
|
||||
# define SBIT_16_TO_8 PNG_MAX_GAMMA_8
|
||||
# else
|
||||
# define SBIT_16_TO_8 16
|
||||
@ -11736,7 +11735,7 @@ int main(int argc, char **argv)
|
||||
* code that 16-bit arithmetic is used for 8-bit samples when it would make a
|
||||
* difference.
|
||||
*/
|
||||
pm.assume_16_bit_calculations = PNG_LIBPNG_VER >= 10700;
|
||||
pm.assume_16_bit_calculations = PNG_LIBPNG_VER == 10700;
|
||||
|
||||
/* Currently 16 bit expansion happens at the end of the pipeline, so the
|
||||
* calculations are done in the input bit depth not the output.
|
||||
@ -11760,13 +11759,13 @@ int main(int argc, char **argv)
|
||||
pm.test_lbg_gamma_threshold = 1;
|
||||
pm.test_lbg_gamma_transform = PNG_LIBPNG_VER >= 10600;
|
||||
pm.test_lbg_gamma_sbit = 1;
|
||||
pm.test_lbg_gamma_composition = PNG_LIBPNG_VER >= 10700;
|
||||
pm.test_lbg_gamma_composition = PNG_LIBPNG_VER == 10700;
|
||||
|
||||
/* And the test encodings */
|
||||
pm.encodings = test_encodings;
|
||||
pm.nencodings = ARRAY_SIZE(test_encodings);
|
||||
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
pm.sbitlow = 8U; /* because libpng doesn't do sBIT below 8! */
|
||||
# else
|
||||
pm.sbitlow = 1U;
|
||||
@ -11796,7 +11795,7 @@ int main(int argc, char **argv)
|
||||
pm.maxout16 = .499; /* Error in *encoded* value */
|
||||
pm.maxabs16 = .00005;/* 1/20000 */
|
||||
pm.maxcalc16 =1./65535;/* +/-1 in 16 bits for compose errors */
|
||||
# if PNG_LIBPNG_VER < 10700
|
||||
# if PNG_LIBPNG_VER != 10700
|
||||
pm.maxcalcG = 1./((1<<PNG_MAX_GAMMA_8)-1);
|
||||
# else
|
||||
pm.maxcalcG = 1./((1<<16)-1);
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* readpng.c
|
||||
*
|
||||
* Copyright (c) 2013 John Cunningham Bowler
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* tarith.c
|
||||
*
|
||||
* Copyright (c) 2021 Cosmin Truta
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* timepng.c
|
||||
*
|
||||
* Copyright (c) 2013,2016 John Cunningham Bowler
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* contrib/mips-mmi/linux.c
|
||||
*
|
||||
* Copyright (c) 2024 Cosmin Truta
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* contrib/mips-msa/linux.c
|
||||
*
|
||||
* Copyright (c) 2020-2023 Cosmin Truta
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user