mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
486 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e7c0ec1e92 | ||
![]() |
fe3a4493e5 | ||
![]() |
a862fd04b9 | ||
![]() |
752c6c0042 | ||
![]() |
dc2b679f13 | ||
![]() |
11ece2b403 | ||
![]() |
22a018e49d | ||
![]() |
934593011b | ||
![]() |
ece1601032 | ||
![]() |
3e878e3f8d | ||
![]() |
0b21dc3efe | ||
![]() |
d0023a7391 | ||
![]() |
11fc1f0f26 | ||
![]() |
dbf3e10487 | ||
![]() |
237b11b573 | ||
![]() |
ca76407b75 | ||
![]() |
aba2535d0f | ||
![]() |
8cae396a20 | ||
![]() |
daa97ebf42 | ||
![]() |
80d36775d4 | ||
![]() |
742c66f37c | ||
![]() |
95e0094f85 | ||
![]() |
09dcb906a7 | ||
![]() |
8d4110bd61 | ||
![]() |
6b7c27341e | ||
![]() |
5a945f3393 | ||
![]() |
b555c55c6d | ||
![]() |
6d610b9c4d | ||
![]() |
0188ecfb8f | ||
![]() |
5c026a3d59 | ||
![]() |
7ea459bd4e | ||
![]() |
a82098a22b | ||
![]() |
6ddc038db9 | ||
![]() |
c1ac308d12 | ||
![]() |
94727db1ea | ||
![]() |
6a1a8df343 | ||
![]() |
6fb875a54e | ||
![]() |
9c7338aa16 | ||
![]() |
c5da514b08 | ||
![]() |
b78e99b1c9 | ||
![]() |
14beb679d4 | ||
![]() |
d92b1c6305 | ||
![]() |
870fcc9b64 | ||
![]() |
09779deaa9 | ||
![]() |
55aea59737 | ||
![]() |
1f2fe83987 | ||
![]() |
1cef0c0eae | ||
![]() |
73adedf0e4 | ||
![]() |
7190c4f5af | ||
![]() |
d189b54e30 | ||
![]() |
c583ec1579 | ||
![]() |
89a025317c | ||
![]() |
7c32176ba0 | ||
![]() |
684c68d6fb | ||
![]() |
829cba63d3 | ||
![]() |
b409572cec | ||
![]() |
94322f3f8f | ||
![]() |
aff684567e | ||
![]() |
8f1c1a6d8c | ||
![]() |
fd3cd9fad2 | ||
![]() |
2921aa280f | ||
![]() |
e40ac66f81 | ||
![]() |
a510a813ef | ||
![]() |
ad5f16c406 | ||
![]() |
2b5be93866 | ||
![]() |
8d28ab2101 | ||
![]() |
29c1086ba3 | ||
![]() |
456d614959 | ||
![]() |
d9006f683c | ||
![]() |
93e111afc5 | ||
![]() |
3a1a5256fa | ||
![]() |
b5da27d211 | ||
![]() |
11c2f47bd6 | ||
![]() |
daf54fe4fc | ||
![]() |
17749bdd61 | ||
![]() |
3ccfba8c28 | ||
![]() |
596f052d69 | ||
![]() |
69ac844654 | ||
![]() |
635a8b9b84 | ||
![]() |
611e8de78c | ||
![]() |
68a6e6755b | ||
![]() |
8738633bd6 | ||
![]() |
b257d4a6a1 | ||
![]() |
df80d38897 | ||
![]() |
9b70e0332b | ||
![]() |
b6ec5eb74e | ||
![]() |
15117f202c | ||
![]() |
4b0a6350cd | ||
![]() |
e4a9c63445 | ||
![]() |
06c1be4b28 | ||
![]() |
cd8a3ffeb1 | ||
![]() |
9db953ad5b | ||
![]() |
91a73053b9 | ||
![]() |
820a090567 | ||
![]() |
20e0daa74a | ||
![]() |
8678f9c3f4 | ||
![]() |
3a990c93f4 | ||
![]() |
39f8f0e6da | ||
![]() |
51148c5255 | ||
![]() |
5e51957594 | ||
![]() |
2cc28ebc00 | ||
![]() |
24e485baec | ||
![]() |
01789a5e8e | ||
![]() |
1f4508c7e2 | ||
![]() |
9946064745 | ||
![]() |
e87d502b16 | ||
![]() |
8c4b258355 | ||
![]() |
7730265b27 | ||
![]() |
75318bc745 | ||
![]() |
c357fb70b5 | ||
![]() |
a88dec67f2 | ||
![]() |
357f3da6b0 | ||
![]() |
53cabf986f | ||
![]() |
adef6f991f | ||
![]() |
bb98fdbf31 | ||
![]() |
aa24431c93 | ||
![]() |
a058d6cee0 | ||
![]() |
445ad8fabf | ||
![]() |
4dc8ea0929 | ||
![]() |
91c2de79b9 | ||
![]() |
06bf45e527 | ||
![]() |
ce12446903 | ||
![]() |
ceaf50079a | ||
![]() |
5129cbb795 | ||
![]() |
5c88d90ce8 | ||
![]() |
57b246e736 | ||
![]() |
32751e6a20 | ||
![]() |
d522ff063f | ||
![]() |
ab096c961b | ||
![]() |
5ce5cb7a9a | ||
![]() |
8ed373b1fa | ||
![]() |
9fee864806 | ||
![]() |
2cd7404743 | ||
![]() |
8583cc23e4 | ||
![]() |
58a54220dd | ||
![]() |
e985b95d65 | ||
![]() |
4925a28f6d | ||
![]() |
4b1b9ce028 | ||
![]() |
76a0ff6a10 | ||
![]() |
00176867fe | ||
![]() |
88c83a2030 | ||
![]() |
ca9e4e3a3b | ||
![]() |
b1ac30b94e | ||
![]() |
79553bcc3d | ||
![]() |
2f70791939 | ||
![]() |
9c5ed64946 | ||
![]() |
687d018609 | ||
![]() |
d50ec244d2 | ||
![]() |
17b747c8a6 | ||
![]() |
af625883d6 | ||
![]() |
ddc5beaa89 | ||
![]() |
74aa31a7c5 | ||
![]() |
193eb0b717 | ||
![]() |
9c20439822 | ||
![]() |
014440e6cd | ||
![]() |
a117d4eacc | ||
![]() |
61c3508c42 | ||
![]() |
0f97758e5f | ||
![]() |
8a6253ed6f | ||
![]() |
c34f3658a7 | ||
![]() |
3cd4a410a5 | ||
![]() |
747cea57e3 | ||
![]() |
ee48ecd71e | ||
![]() |
e621f04541 | ||
![]() |
beddd7ed53 | ||
![]() |
67faef917b | ||
![]() |
9c526e5a5d | ||
![]() |
7a6bbfd649 | ||
![]() |
90238dfe7a | ||
![]() |
fb31308aea | ||
![]() |
b0c2c4154a | ||
![]() |
8eb6549dac | ||
![]() |
969d5a27dd | ||
![]() |
394b2868f7 | ||
![]() |
82090022e7 | ||
![]() |
5290847c3e | ||
![]() |
f3c2a77175 | ||
![]() |
55246f5ed6 | ||
![]() |
7852e7786b | ||
![]() |
5310158c37 | ||
![]() |
6e0f47f88f | ||
![]() |
9e6249907b | ||
![]() |
2ccc2774f5 | ||
![]() |
956a73a961 | ||
![]() |
df8dd1183c | ||
![]() |
f2f5e89566 | ||
![]() |
023ff22642 | ||
![]() |
d0885f09af | ||
![]() |
259a5fc20d | ||
![]() |
6c9ef75c6b | ||
![]() |
e99366837d | ||
![]() |
e73cc88b21 | ||
![]() |
60b6a64975 | ||
![]() |
1516875105 | ||
![]() |
36f9f0bcc8 | ||
![]() |
6390528fab | ||
![]() |
7de192f1e7 | ||
![]() |
cdc0ed8424 | ||
![]() |
ff3171322c | ||
![]() |
1ee1fcc805 | ||
![]() |
98b0236a8b | ||
![]() |
fba09cf080 | ||
![]() |
ba6c8d143d | ||
![]() |
af759fb3fe | ||
![]() |
c98798e7dc | ||
![]() |
e66d9c2416 | ||
![]() |
4904cbce65 | ||
![]() |
d2016be48d | ||
![]() |
beaacb7821 | ||
![]() |
d485bd1379 | ||
![]() |
d27ed3f759 | ||
![]() |
a73110b6ad | ||
![]() |
d92bbef414 | ||
![]() |
a00d14ddcf | ||
![]() |
e4e3df8abb | ||
![]() |
788c61a37f | ||
![]() |
a2fbb6d41b | ||
![]() |
c8af7e705d | ||
![]() |
7a456ca882 | ||
![]() |
1f1c0aec9b | ||
![]() |
3adf7f7bc8 | ||
![]() |
4449a29e1e | ||
![]() |
d4c7833273 | ||
![]() |
4f4a757c82 | ||
![]() |
f1dd8adb83 | ||
![]() |
799943a1e6 | ||
![]() |
dfa6aea8ac | ||
![]() |
e9a25f4568 | ||
![]() |
c8ada608b9 | ||
![]() |
101a87cb0f | ||
![]() |
62c3f9f0fe | ||
![]() |
a951c329bd | ||
![]() |
ea9249fe5b | ||
![]() |
449a3c9764 | ||
![]() |
38fb839420 | ||
![]() |
77adefeda6 | ||
![]() |
b86dd0b19b | ||
![]() |
c5c7156df0 | ||
![]() |
01ad4848be | ||
![]() |
95eaa0b471 | ||
![]() |
cc323808f9 | ||
![]() |
b152f8b6c5 | ||
![]() |
71fcb39efc | ||
![]() |
c5568595ff | ||
![]() |
bd7143e6eb | ||
![]() |
705ac2fbbc | ||
![]() |
ad9982f677 | ||
![]() |
feb216b62d | ||
![]() |
997a64992d | ||
![]() |
9d268b7758 | ||
![]() |
642b1d8f1e | ||
![]() |
24726a403f | ||
![]() |
eff3cc82c3 | ||
![]() |
3309da76cd | ||
![]() |
fe7b94da93 | ||
![]() |
c5b84c0ba6 | ||
![]() |
551435c359 | ||
![]() |
f880e3a735 | ||
![]() |
b3b9360373 | ||
![]() |
1feb6e2ef5 | ||
![]() |
25c8915f7c | ||
![]() |
6a17b3b469 | ||
![]() |
67859c8fcb | ||
![]() |
fb8831d19a | ||
![]() |
2c3d751c3b | ||
![]() |
7689f1f96d | ||
![]() |
d29c519969 | ||
![]() |
567bdd03e3 | ||
![]() |
bd12c0ebbb | ||
![]() |
a6f079d4d7 | ||
![]() |
ffeb8f0d09 | ||
![]() |
ea216228f3 | ||
![]() |
fd03dddd78 | ||
![]() |
ce47f54deb | ||
![]() |
4d4bfbc034 | ||
![]() |
de089548e0 | ||
![]() |
0801f13173 | ||
![]() |
5588ed34ef | ||
![]() |
45b47c1a1c | ||
![]() |
333ca5496b | ||
![]() |
bfcfdce7af | ||
![]() |
bc92887b2d | ||
![]() |
ae8174d9a3 | ||
![]() |
a3bece6bb7 | ||
![]() |
1087026c09 | ||
![]() |
080fecf0e4 | ||
![]() |
7bef6f83ec | ||
![]() |
dc7e768526 | ||
![]() |
a5173354d2 | ||
![]() |
2defb206e7 | ||
![]() |
6ab1f4903f | ||
![]() |
34df4eb5ad | ||
![]() |
ec89c54e42 | ||
![]() |
f02bb98fdf | ||
![]() |
30b247f1ea | ||
![]() |
a829dc9ed2 | ||
![]() |
033a157a65 | ||
![]() |
48398987d8 | ||
![]() |
09d718fae9 | ||
![]() |
69a163b1f9 | ||
![]() |
64a36e34a7 | ||
![]() |
712f8aab93 | ||
![]() |
f0d59e3f9b | ||
![]() |
bb0407f3dc | ||
![]() |
b4a08b81b2 | ||
![]() |
880636292c | ||
![]() |
cdede7664e | ||
![]() |
893153aba3 | ||
![]() |
2971634978 | ||
![]() |
10de36ef25 | ||
![]() |
17637544be | ||
![]() |
7f47448f49 | ||
![]() |
96a0c6a8c2 | ||
![]() |
657dee1f3a | ||
![]() |
a3b6fa08b2 | ||
![]() |
44ef7ceb62 | ||
![]() |
5d10f7c5f1 | ||
![]() |
aad05aa948 | ||
![]() |
c4e1faded4 | ||
![]() |
c34143f615 | ||
![]() |
85d027f3d0 | ||
![]() |
1d82c0f287 | ||
![]() |
301e06a46c | ||
![]() |
34d6c6882c | ||
![]() |
da78c32207 | ||
![]() |
ecfc22a681 | ||
![]() |
6ec5e3ff67 | ||
![]() |
0e44f72b10 | ||
![]() |
1ec6c5f335 | ||
![]() |
d19ad72e28 | ||
![]() |
1b69de718e | ||
![]() |
e67a47a19a | ||
![]() |
095b6f7f90 | ||
![]() |
fb908d6ae2 | ||
![]() |
354cd3930b | ||
![]() |
8bf001b9da | ||
![]() |
f8d9b8b381 | ||
![]() |
d1031d714b | ||
![]() |
33af2b7d98 | ||
![]() |
da3031a7d9 | ||
![]() |
1679d4ce0f | ||
![]() |
5feedee233 | ||
![]() |
a92e5a86f8 | ||
![]() |
8849c000ea | ||
![]() |
06364d4585 | ||
![]() |
e3ab2fe6e9 | ||
![]() |
9f75a55f9d | ||
![]() |
4c1eaadf38 | ||
![]() |
06f0c77a24 | ||
![]() |
6ad7871545 | ||
![]() |
3b69793c6f | ||
![]() |
10303740d1 | ||
![]() |
572ba70905 | ||
![]() |
bc6abe8af8 | ||
![]() |
3051d453ef | ||
![]() |
11be27ed2c | ||
![]() |
041f4465d0 | ||
![]() |
c9f2269857 | ||
![]() |
6636826302 | ||
![]() |
8799d78361 | ||
![]() |
54491e8535 | ||
![]() |
40a8cd052a | ||
![]() |
77a0a2ea11 | ||
![]() |
798d3de5f6 | ||
![]() |
5b4aa7841b | ||
![]() |
bec9ca9b8a | ||
![]() |
77a817bfc2 | ||
![]() |
5b9fe98c5f | ||
![]() |
d91f8b0fe8 | ||
![]() |
1a3d6e3cf3 | ||
![]() |
c4b099396a | ||
![]() |
6d35722f70 | ||
![]() |
84dc479108 | ||
![]() |
8e4a89f0f9 | ||
![]() |
3d3c517bc4 | ||
![]() |
c11abedafe | ||
![]() |
a743b5ae08 | ||
![]() |
649f94515a | ||
![]() |
ea36195983 | ||
![]() |
dbd687d64f | ||
![]() |
0a7508fd9b | ||
![]() |
4a641ce19c | ||
![]() |
5e6764a39a | ||
![]() |
c0858ea57f | ||
![]() |
5976cbbe6d | ||
![]() |
eb4b51674f | ||
![]() |
94decfcca7 | ||
![]() |
a2669c39c3 | ||
![]() |
c53980584e | ||
![]() |
7515f2e5e6 | ||
![]() |
5255518620 | ||
![]() |
ab43bdaa84 | ||
![]() |
508a744251 | ||
![]() |
62cfc893e0 | ||
![]() |
9b66cbcf2f | ||
![]() |
58514a2eba | ||
![]() |
494a0040f4 | ||
![]() |
5aca696114 | ||
![]() |
b0673cb50f | ||
![]() |
a8488b78dc | ||
![]() |
abc54c090b | ||
![]() |
3f490d128f | ||
![]() |
12a5993ec5 | ||
![]() |
7c699f27fc | ||
![]() |
33b90debc5 | ||
![]() |
1badb47dc3 | ||
![]() |
f3862ea1be | ||
![]() |
47777cac10 | ||
![]() |
e7d41c565b | ||
![]() |
753fd3f2cd | ||
![]() |
25a7dd9956 | ||
![]() |
0c577a7f95 | ||
![]() |
11c1e0d6e2 | ||
![]() |
6e3b0c2e3a | ||
![]() |
95ea04f925 | ||
![]() |
cabfa7d6d9 | ||
![]() |
8cc5341ba2 | ||
![]() |
0054b566f4 | ||
![]() |
1a2606069c | ||
![]() |
2cbe15a3e2 | ||
![]() |
4588e97c73 | ||
![]() |
08c3a838a3 | ||
![]() |
77c1d30d14 | ||
![]() |
ae44b27606 | ||
![]() |
7dc03b1f91 | ||
![]() |
3aebf04909 | ||
![]() |
795b564635 | ||
![]() |
860d8f3f85 | ||
![]() |
9ff5d76fb8 | ||
![]() |
e088ce7363 | ||
![]() |
709db87a32 | ||
![]() |
af569eb682 | ||
![]() |
9ecdaa8d6d | ||
![]() |
87685ab33f | ||
![]() |
83b354ac01 | ||
![]() |
613dd05c55 | ||
![]() |
ff355004dd | ||
![]() |
6a169bbe76 | ||
![]() |
b705271d85 | ||
![]() |
c924d3dd25 | ||
![]() |
d5d0bd91d2 | ||
![]() |
fd53b86e90 | ||
![]() |
60370be808 | ||
![]() |
13266edb47 | ||
![]() |
d26920d5a8 | ||
![]() |
0e23e2ad9f | ||
![]() |
e9a249eee7 | ||
![]() |
6e36306728 | ||
![]() |
6e4c75b2c2 | ||
![]() |
6fb8433ecc | ||
![]() |
2f5fc20ee7 | ||
![]() |
49607cf603 | ||
![]() |
0fd067dd93 | ||
![]() |
8a3b400826 | ||
![]() |
c1269a3975 | ||
![]() |
9bb65df0be | ||
![]() |
8b8e9bfb29 | ||
![]() |
b57e9b747f | ||
![]() |
38a706f83f | ||
![]() |
6aad6041aa | ||
![]() |
2c78d4f676 | ||
![]() |
d4247dd398 | ||
![]() |
1ca16d92f2 | ||
![]() |
0ff5150f91 | ||
![]() |
fc9127370c | ||
![]() |
adc8042fca | ||
![]() |
c4c21f1c87 | ||
![]() |
0b8b358b98 | ||
![]() |
8f7fc403e5 | ||
![]() |
16dba768df | ||
![]() |
0054bee2a6 | ||
![]() |
454e05a63a | ||
![]() |
caae038b69 | ||
![]() |
c11a25973c | ||
![]() |
b40411882a | ||
![]() |
755c39725e | ||
![]() |
d9c4484b3e | ||
![]() |
b7b42de05f | ||
![]() |
65de519c4a | ||
![]() |
b27c862b14 | ||
![]() |
f97ed91ead | ||
![]() |
97b6ad1c06 | ||
![]() |
7746299fbe | ||
![]() |
8d69281998 | ||
![]() |
4d3d2d9472 | ||
![]() |
8ae616fa97 |
@ -1,81 +0,0 @@
|
|||||||
version: 1.6.x-{build}
|
|
||||||
|
|
||||||
branches:
|
|
||||||
except:
|
|
||||||
- /libpng[0-1][0-8]/
|
|
||||||
- /v[0-1][.][0-8][.][0-9]+/
|
|
||||||
|
|
||||||
image:
|
|
||||||
- Visual Studio 2022
|
|
||||||
|
|
||||||
shallow_clone: true
|
|
||||||
|
|
||||||
environment:
|
|
||||||
matrix:
|
|
||||||
- TOOLCHAIN: vstudio
|
|
||||||
AUTOMATION: cmake
|
|
||||||
ARCH: x86
|
|
||||||
- TOOLCHAIN: vstudio
|
|
||||||
AUTOMATION: cmake
|
|
||||||
ARCH: x64
|
|
||||||
- TOOLCHAIN: vstudio
|
|
||||||
AUTOMATION: cmake
|
|
||||||
ARCH: arm64
|
|
||||||
- TOOLCHAIN: llvm
|
|
||||||
AUTOMATION: cmake
|
|
||||||
ARCH: x64
|
|
||||||
- TOOLCHAIN: msys2
|
|
||||||
AUTOMATION: cmake
|
|
||||||
ARCH: i686
|
|
||||||
- TOOLCHAIN: msys2
|
|
||||||
AUTOMATION: cmake
|
|
||||||
ARCH: x86_64
|
|
||||||
- TOOLCHAIN: msys2
|
|
||||||
AUTOMATION: configure
|
|
||||||
ARCH: i686
|
|
||||||
- TOOLCHAIN: msys2
|
|
||||||
AUTOMATION: configure
|
|
||||||
ARCH: x86_64
|
|
||||||
- TOOLCHAIN: msys2
|
|
||||||
AUTOMATION: makefiles
|
|
||||||
ARCH: i686
|
|
||||||
- TOOLCHAIN: msys2
|
|
||||||
AUTOMATION: makefiles
|
|
||||||
ARCH: x86_64
|
|
||||||
|
|
||||||
install:
|
|
||||||
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows'
|
|
||||||
- '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'
|
|
||||||
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake'
|
|
||||||
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x86" set CI_CMAKE_GENERATOR_PLATFORM=Win32'
|
|
||||||
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x64" set CI_CMAKE_GENERATOR_PLATFORM=x64'
|
|
||||||
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_GENERATOR_PLATFORM=ARM64'
|
|
||||||
- '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'
|
|
||||||
- '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'
|
|
||||||
- 'set CI_MAKEFILES=scripts/makefile.gcc scripts/makefile.msys scripts/makefile.std'
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- 'if "%TOOLCHAIN%"=="vstudio" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"'
|
|
||||||
- 'if "%TOOLCHAIN%"=="llvm" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"'
|
|
||||||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"'
|
|
||||||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="configure" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_configure.sh"'
|
|
||||||
- '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:\msys64\var\cache\pacman'
|
|
@ -1,94 +0,0 @@
|
|||||||
# 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
|
|
@ -1,55 +0,0 @@
|
|||||||
# https://editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
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]
|
|
||||||
indent_size = 3
|
|
||||||
indent_style = space
|
|
||||||
max_doc_length = 80
|
|
||||||
max_line_length = 100
|
|
||||||
|
|
||||||
[*.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,aclocal.m4,ltmain.sh}]
|
|
||||||
indent_size = unset
|
|
||||||
indent_style = unset
|
|
||||||
insert_final_newline = unset
|
|
||||||
max_doc_length = unset
|
|
||||||
max_line_length = unset
|
|
||||||
trim_trailing_whitespace = unset
|
|
||||||
|
|
||||||
[COMMIT_EDITMSG]
|
|
||||||
indent_style = space
|
|
||||||
max_doc_length = unset
|
|
||||||
max_line_length = 72
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"Disable": {
|
|
||||||
"IndentSize": true
|
|
||||||
},
|
|
||||||
"Exclude": [
|
|
||||||
".git/",
|
|
||||||
"out/"
|
|
||||||
]
|
|
||||||
}
|
|
31
.github/workflows/lint.yml
vendored
31
.github/workflows/lint.yml
vendored
@ -1,31 +0,0 @@
|
|||||||
name: Linting libpng
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- libpng16
|
|
||||||
- libpng18
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- libpng16
|
|
||||||
- libpng18
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 5
|
|
||||||
steps:
|
|
||||||
- name: Set up the cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/pip.txt') }}
|
|
||||||
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
|
|
||||||
run: bash ./ci/ci_lint.sh
|
|
159
.gitignore
vendored
159
.gitignore
vendored
@ -1,159 +0,0 @@
|
|||||||
# Prerequisites
|
|
||||||
*.d
|
|
||||||
|
|
||||||
# Precompiled headers
|
|
||||||
*.gch
|
|
||||||
*.pch
|
|
||||||
|
|
||||||
# Object files
|
|
||||||
*.slo
|
|
||||||
*.lo
|
|
||||||
*.o
|
|
||||||
*.obj
|
|
||||||
|
|
||||||
# Linker output files
|
|
||||||
*.exp
|
|
||||||
*.ilk
|
|
||||||
*.map
|
|
||||||
|
|
||||||
# Compiled dynamic libraries
|
|
||||||
*.dll
|
|
||||||
*.dylib
|
|
||||||
*.so
|
|
||||||
*.so.*
|
|
||||||
|
|
||||||
# Compiled static libraries
|
|
||||||
*.a
|
|
||||||
*.la
|
|
||||||
*.lai
|
|
||||||
*.lib
|
|
||||||
|
|
||||||
# Compiled executables
|
|
||||||
*.app/
|
|
||||||
*.exe
|
|
||||||
a.out
|
|
||||||
|
|
||||||
# Debug files
|
|
||||||
*.dSYM/
|
|
||||||
*.idb
|
|
||||||
*.pdb
|
|
||||||
*.su
|
|
||||||
|
|
||||||
# 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
|
|
||||||
*out.png
|
|
||||||
[._]deps/
|
|
||||||
[._]libs/
|
|
||||||
.dirstamp
|
|
||||||
/Makefile
|
|
||||||
/autom4te.cache/
|
|
||||||
/config*~
|
|
||||||
/config.h
|
|
||||||
/config.log
|
|
||||||
/config.status
|
|
||||||
/install*~
|
|
||||||
/libpng*-config
|
|
||||||
/libpng*.pc
|
|
||||||
/libpng.vers
|
|
||||||
/libtool
|
|
||||||
/stamp-h1
|
|
||||||
CMake*.json
|
|
||||||
!CMakePresets.json
|
|
||||||
CMakeLists.txt.*
|
|
||||||
pnglibconf.[ch]
|
|
||||||
pnglibconf.dfn
|
|
||||||
pnglibconf.pre
|
|
||||||
pngprefix.h
|
|
||||||
|
|
||||||
# Libpng test programs, scripts and artifacts
|
|
||||||
/test-suite.log
|
|
||||||
/tests/*.log
|
|
||||||
/tests/*.trs
|
|
||||||
/png-fix-itxt
|
|
||||||
/pngcp
|
|
||||||
/pngfix
|
|
||||||
/pngimage
|
|
||||||
/pngstest
|
|
||||||
/pngtest
|
|
||||||
/pngunknown
|
|
||||||
/pngvalid
|
|
||||||
/timepng
|
|
@ -1,7 +0,0 @@
|
|||||||
extends: default
|
|
||||||
rules:
|
|
||||||
document-start: disable
|
|
||||||
document-end: disable
|
|
||||||
line-length: disable
|
|
||||||
truthy:
|
|
||||||
check-keys: false
|
|
73
ANNOUNCE
73
ANNOUNCE
@ -1,53 +1,46 @@
|
|||||||
libpng 1.6.51.git
|
|
||||||
=================
|
|
||||||
|
|
||||||
This is a development version, not intended to be a public release.
|
Libpng 1.5.29 - August 24, 2017
|
||||||
It will be replaced by a public release, or by another development
|
|
||||||
version, at a later time.
|
|
||||||
|
|
||||||
|
This is a public release of libpng, intended for use in production codes.
|
||||||
|
|
||||||
libpng 1.6.50 - July 1, 2025
|
Files available for download:
|
||||||
============================
|
|
||||||
|
|
||||||
This is a public release of libpng, intended for use in production code.
|
Source files with LF line endings (for Unix/Linux) and with a
|
||||||
|
"configure" script
|
||||||
|
|
||||||
|
libpng-1.5.29.tar.xz (LZMA-compressed, recommended)
|
||||||
|
libpng-1.5.29.tar.gz
|
||||||
|
|
||||||
Files available for download
|
Source files with CRLF line endings (for Windows), without the
|
||||||
----------------------------
|
"configure" script
|
||||||
|
|
||||||
Source files with LF line endings (for Unix/Linux):
|
lpng1529.7z (LZMA-compressed, recommended)
|
||||||
|
lpng1529.zip
|
||||||
* 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):
|
|
||||||
|
|
||||||
* lpng1650.7z (LZMA-compressed, recommended)
|
|
||||||
* lpng1650.zip (deflate-compressed)
|
|
||||||
|
|
||||||
Other information:
|
Other information:
|
||||||
|
|
||||||
* README.md
|
libpng-1.5.29-README.txt
|
||||||
* LICENSE.md
|
libpng-1.5.29-LICENSE.txt
|
||||||
* AUTHORS.md
|
libpng-1.5.29-*.asc (armored detached GPG signatures)
|
||||||
* TRADEMARK.md
|
|
||||||
|
|
||||||
|
Changes since the last public release (1.5.28):
|
||||||
|
Suppress clang warnings about implicit sign changes in png.c
|
||||||
|
Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer).
|
||||||
|
Added missing "$(CPPFLAGS)" to the compile line for c.pic.o in
|
||||||
|
makefile.linux and makefile.solaris-x86 (Cosmin).
|
||||||
|
Silence clang -Wcomma warnings (Viktor Szakats).
|
||||||
|
Update Sourceforge URLs in documentation (https instead of http).
|
||||||
|
Moved chunk-name and chunk-length checks into PNG_EXTERN private
|
||||||
|
png_check_chunk_name() and png_check_chunk_length() functions
|
||||||
|
(Suggested by Max Stepin).
|
||||||
|
Merged pngtest.c with libpng-1.6.32.
|
||||||
|
Check for 0 return from png_get_rowbytes() in contrib/pngminus/*.c to stop
|
||||||
|
some Coverity issues (162705, 162706, and 162707).
|
||||||
|
|
||||||
Changes from version 1.6.49 to version 1.6.50
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
---------------------------------------------
|
(subscription required; visit
|
||||||
|
|
||||||
* 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`.
|
|
||||||
|
|
||||||
|
|
||||||
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
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
to subscribe.
|
to subscribe)
|
||||||
|
or to glennrp at users.sourceforge.net
|
||||||
|
|
||||||
|
Glenn R-P
|
||||||
|
66
AUTHORS
66
AUTHORS
@ -1,66 +0,0 @@
|
|||||||
PNG REFERENCE LIBRARY AUTHORS
|
|
||||||
=============================
|
|
||||||
|
|
||||||
This is the list of PNG Reference Library ("libpng") Contributing
|
|
||||||
Authors, for copyright and licensing purposes.
|
|
||||||
|
|
||||||
* Adam Richter
|
|
||||||
* Andreas Dilger
|
|
||||||
* Chris Blume
|
|
||||||
* Cosmin Truta
|
|
||||||
* Dave Martindale
|
|
||||||
* Eric S. Raymond
|
|
||||||
* Gilles Vollant
|
|
||||||
* Glenn Randers-Pehrson
|
|
||||||
* Greg Roelofs
|
|
||||||
* Guy Eric Schalnat
|
|
||||||
* James Yu
|
|
||||||
* John Bowler
|
|
||||||
* Kevin Bracey
|
|
||||||
* Lucas Chollet
|
|
||||||
* Magnus Holmgren
|
|
||||||
* Mandar Sahastrabuddhe
|
|
||||||
* Manfred Schlaegl
|
|
||||||
* Mans Rullgard
|
|
||||||
* Matt Sarett
|
|
||||||
* Mike Klein
|
|
||||||
* Pascal Massimino
|
|
||||||
* Paul Schmidt
|
|
||||||
* Philippe Antoine
|
|
||||||
* Qiang Zhou
|
|
||||||
* Sam Bushell
|
|
||||||
* Samuel Williams
|
|
||||||
* Simon-Pierre Cadieux
|
|
||||||
* Tim Wegner
|
|
||||||
* Tom Lane
|
|
||||||
* Tom Tanner
|
|
||||||
* Vadim Barkov
|
|
||||||
* Willem van Schaik
|
|
||||||
* Zhijie Liang
|
|
||||||
* Apple Inc.
|
|
||||||
- Zixu Wang (王子旭)
|
|
||||||
* Arm Holdings
|
|
||||||
- Richard Townsend
|
|
||||||
* Google LLC
|
|
||||||
- Dan Field
|
|
||||||
- Dragoș Tiselice
|
|
||||||
- Leon Scroggins III
|
|
||||||
- Matt Sarett
|
|
||||||
- Mike Klein
|
|
||||||
- Sami Boukortt
|
|
||||||
- Wan-Teh Chang
|
|
||||||
* Loongson Technology Corporation Ltd.
|
|
||||||
- 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
|
|
||||||
other copyright owners, but are released under the libpng license.
|
|
||||||
|
|
||||||
Some files in the "ci" and "contrib" directories, as well as some
|
|
||||||
of the tools-generated files that are distributed with libpng, have
|
|
||||||
other copyright owners, and are released under other open source
|
|
||||||
licenses.
|
|
1463
CMakeLists.txt
1463
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
173
INSTALL
173
INSTALL
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
Installing libpng
|
Installing libpng
|
||||||
|
|
||||||
Contents
|
Contents
|
||||||
@ -12,14 +13,13 @@ Contents
|
|||||||
VIII. Configuring libpng for 16-bit platforms
|
VIII. Configuring libpng for 16-bit platforms
|
||||||
IX. Configuring for DOS
|
IX. Configuring for DOS
|
||||||
X. Configuring for Medium Model
|
X. Configuring for Medium Model
|
||||||
XI. Prepending a prefix to exported symbols
|
XI. Omitted
|
||||||
XII. Configuring for compiler xxx:
|
XII. Configuring for compiler xxx:
|
||||||
XIII. Removing unwanted object code
|
XIII. Removing unwanted object code
|
||||||
XIV. Enabling or disabling hardware optimizations
|
XIV. Changes to the build and configuration of libpng in libpng-1.5.x
|
||||||
XV. Changes to the build and configuration of libpng in libpng-1.5.x
|
XV. Setjmp/longjmp issues
|
||||||
XVI. Setjmp/longjmp issues
|
XVI. Common linking failures
|
||||||
XVII. Common linking failures
|
XVII. Other sources of information about libpng
|
||||||
XVIII. Other sources of information about libpng
|
|
||||||
|
|
||||||
I. Simple installation
|
I. Simple installation
|
||||||
|
|
||||||
@ -78,8 +78,8 @@ Or you can use one of the "projects" in the "projects" directory.
|
|||||||
|
|
||||||
Before installing libpng, you must first install zlib, if it
|
Before installing libpng, you must first install zlib, if it
|
||||||
is not already on your system. zlib can usually be found
|
is not already on your system. zlib can usually be found
|
||||||
wherever you got libpng; otherwise go to https://zlib.net/. You can
|
wherever you got libpng; otherwise go to http://zlib.net. You can place
|
||||||
place zlib in the same directory as libpng or in another directory.
|
zlib in the same directory as libpng or in another directory.
|
||||||
|
|
||||||
If your system already has a preinstalled zlib you will still need
|
If your system already has a preinstalled zlib you will still need
|
||||||
to have access to the zlib.h and zconf.h include files that
|
to have access to the zlib.h and zconf.h include files that
|
||||||
@ -127,18 +127,16 @@ Your directory structure should look like this:
|
|||||||
README
|
README
|
||||||
*.h, *.c => libpng source files
|
*.h, *.c => libpng source files
|
||||||
CMakeLists.txt => "cmake" script
|
CMakeLists.txt => "cmake" script
|
||||||
ci
|
|
||||||
ci_*.sh
|
|
||||||
configuration files:
|
configuration files:
|
||||||
configure.ac, configure, Makefile.am, Makefile.in,
|
configure.ac, configure, Makefile.am, Makefile.in,
|
||||||
autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in,
|
autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in,
|
||||||
libpng-config.in, aclocal.m4, config.h.in, config.sub,
|
libpng-config.in, aclocal.m4, config.h.in, config.sub,
|
||||||
depcomp, install-sh, mkinstalldirs, test-pngtest.sh, etc.
|
depcomp, install-sh, mkinstalldirs, test-pngtest.sh
|
||||||
contrib
|
contrib
|
||||||
arm-neon, conftest, examples, gregbook, libtests, pngminim,
|
gregbook, libtests, pngminim, pngminus, pngsuite, tools,
|
||||||
pngminus, pngsuite, tools, visupng, riscv-rvv
|
visupng
|
||||||
projects
|
projects
|
||||||
owatcom, visualc71, vstudio
|
cbuilder5, owatcom, visualc71, vstudio, xcode
|
||||||
scripts
|
scripts
|
||||||
makefile.*
|
makefile.*
|
||||||
*.def (module definition files)
|
*.def (module definition files)
|
||||||
@ -146,7 +144,7 @@ Your directory structure should look like this:
|
|||||||
pngtest.png
|
pngtest.png
|
||||||
etc.
|
etc.
|
||||||
zlib
|
zlib
|
||||||
README, *.h, *.c, contrib, etc.
|
README, *.h, *.c contrib, etc.
|
||||||
|
|
||||||
If the line endings in the files look funny, you may wish to get the other
|
If the line endings in the files look funny, you may wish to get the other
|
||||||
distribution of libpng. It is available in both tar.gz (UNIX style line
|
distribution of libpng. It is available in both tar.gz (UNIX style line
|
||||||
@ -154,27 +152,28 @@ endings) and zip (DOS style line endings) formats.
|
|||||||
|
|
||||||
VI. Building with project files
|
VI. Building with project files
|
||||||
|
|
||||||
If you are building libpng with Microsoft Visual Studio, you can enter
|
If you are building libpng with MSVC, you can enter the
|
||||||
the directory projects\visualc71 or projects\vstudio and follow the
|
libpng projects\visualc71 or vstudio directory and follow the instructions
|
||||||
instructions in README.txt.
|
in README.txt.
|
||||||
|
|
||||||
Otherwise, enter the zlib directory and follow the instructions in
|
Otherwise enter the zlib directory and follow the instructions in zlib/README,
|
||||||
zlib/README, then come back here and run "configure" or choose the
|
then come back here and run "configure" or choose the appropriate
|
||||||
appropriate makefile in the scripts directory.
|
makefile.sys in the scripts directory.
|
||||||
|
|
||||||
VII. Building with makefiles
|
VII. Building with makefiles
|
||||||
|
|
||||||
Copy the file (or files) that you need from the
|
Copy the file (or files) that you need from the
|
||||||
scripts directory into this directory, for example
|
scripts directory into this directory, for example
|
||||||
|
|
||||||
|
MSDOS example:
|
||||||
|
|
||||||
|
copy scripts\makefile.msc makefile
|
||||||
|
copy scripts\pnglibconf.h.prebuilt pnglibconf.h
|
||||||
|
|
||||||
UNIX example:
|
UNIX example:
|
||||||
|
|
||||||
cp scripts/makefile.std Makefile
|
cp scripts/makefile.std makefile
|
||||||
make
|
cp scripts/pnglibconf.h.prebuilt pnglibconf.h
|
||||||
|
|
||||||
Windows example:
|
|
||||||
|
|
||||||
nmake -f scripts\makefile.vcwin32
|
|
||||||
|
|
||||||
Read the makefile to see if you need to change any source or
|
Read the makefile to see if you need to change any source or
|
||||||
target directories to match your preferences.
|
target directories to match your preferences.
|
||||||
@ -191,44 +190,38 @@ test. For more confidence, you can run another test by typing
|
|||||||
Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
|
Also, you can run "pngtest -m contrib/pngsuite/*.png" and compare
|
||||||
your output with the result shown in contrib/pngsuite/README.
|
your output with the result shown in contrib/pngsuite/README.
|
||||||
|
|
||||||
Most of the makefiles used to allow you to run "make install" to put
|
Most of the makefiles will allow you to run "make install" to
|
||||||
the library in its final resting place, but that feature is no longer
|
put the library in its final resting place (if you want to
|
||||||
supported. The only tested and supported manners to install libpng are
|
do that, run "make install" in the zlib directory first if necessary).
|
||||||
the conventional build and install procedures driven by the configure
|
Some also allow you to run "make test-installed" after you have
|
||||||
script or by the CMake file.
|
run "make install".
|
||||||
|
|
||||||
VIII. Configuring for DOS and other 16-bit platforms
|
VIII. Configuring libpng for 16-bit platforms
|
||||||
|
|
||||||
Officially, the support for 16-bit platforms has been removed.
|
You will want to look into zconf.h to tell zlib (and thus libpng) that
|
||||||
|
it cannot allocate more than 64K at a time. Even if you can, the memory
|
||||||
|
won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K.
|
||||||
|
|
||||||
|
IX. Configuring for DOS
|
||||||
|
|
||||||
For DOS users who only have access to the lower 640K, you will
|
For DOS users who only have access to the lower 640K, you will
|
||||||
have to limit zlib's memory usage via a png_set_compression_mem_level()
|
have to limit zlib's memory usage via a png_set_compression_mem_level()
|
||||||
call. See zlib.h or zconf.h in the zlib library for more information.
|
call. See zlib.h or zconf.h in the zlib library for more information.
|
||||||
|
|
||||||
You may be or may not be in luck if you target the "large" memory model,
|
X. Configuring for Medium Model
|
||||||
but all the smaller models ("small", "compact" and "medium") are known
|
|
||||||
to be unworkable. For DOS users who have access beyond the lower 640K,
|
|
||||||
a "flat" 32-bit DOS model (such as DJGPP) is strongly recommended.
|
|
||||||
|
|
||||||
For DOS users who only have access to the lower 640K, you will have to
|
Libpng's support for medium model has been tested on most of the popular
|
||||||
limit zlib's memory usage via a png_set_compression_mem_level() call.
|
compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
|
||||||
You will also have to look into zconf.h to tell zlib (and thus libpng)
|
defined, and FAR gets defined to far in pngconf.h, and you should be
|
||||||
that it cannot allocate more than 64K at a time. Even if you can, the
|
all set. Everything in the library (except for zlib's structure) is
|
||||||
memory won't be accessible. Therefore, you should limit zlib and libpng
|
expecting far data. You must use the typedefs with the p or pp on
|
||||||
to 64K by defining MAXSEG_64K.
|
the end for pointers (or at least look at them and be careful). Make
|
||||||
|
note that the rows of data are defined as png_bytepp, which is
|
||||||
|
an "unsigned char far * far *".
|
||||||
|
|
||||||
IX. Prepending a prefix to exported symbols
|
XI. Omitted
|
||||||
|
|
||||||
Starting with libpng-1.6.0, you can configure libpng (when using the
|
XII. Configuring for compiler xxx:
|
||||||
"configure" script) to prefix all exported symbols by means of the
|
|
||||||
configuration option "--with-libpng-prefix=FOO_", where FOO_ can be any
|
|
||||||
string beginning with a letter and containing only uppercase
|
|
||||||
and lowercase letters, digits, and the underscore (i.e., a C language
|
|
||||||
identifier). This creates a set of macros in pnglibconf.h, so this is
|
|
||||||
transparent to applications; their function calls get transformed by
|
|
||||||
the macros to use the modified names.
|
|
||||||
|
|
||||||
X. Configuring for compiler xxx:
|
|
||||||
|
|
||||||
All includes for libpng are in pngconf.h. If you need to add, change
|
All includes for libpng are in pngconf.h. If you need to add, change
|
||||||
or delete an include, this is the place to do it.
|
or delete an include, this is the place to do it.
|
||||||
@ -240,7 +233,7 @@ As of libpng-1.5.0, pngpriv.h also includes three other private header
|
|||||||
files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material
|
files, pngstruct.h, pnginfo.h, and pngdebug.h, which contain material
|
||||||
that previously appeared in the public headers.
|
that previously appeared in the public headers.
|
||||||
|
|
||||||
XI. Removing unwanted object code
|
XIII. Removing unwanted object code
|
||||||
|
|
||||||
There are a bunch of #define's in pngconf.h that control what parts of
|
There are a bunch of #define's in pngconf.h that control what parts of
|
||||||
libpng are compiled. All the defines end in _SUPPORTED. If you are
|
libpng are compiled. All the defines end in _SUPPORTED. If you are
|
||||||
@ -279,61 +272,7 @@ library to fail if they call functions not available in your library.
|
|||||||
The size of the library itself should not be an issue, because only
|
The size of the library itself should not be an issue, because only
|
||||||
those sections that are actually used will be loaded into memory.
|
those sections that are actually used will be loaded into memory.
|
||||||
|
|
||||||
XII. Enabling or disabling hardware optimizations
|
XIV. Changes to the build and configuration of libpng in libpng-1.5.x
|
||||||
|
|
||||||
Certain hardware capabilities, such as the Intel SSE instructions,
|
|
||||||
are normally detected at run time. Enable them with configure options
|
|
||||||
such as one of
|
|
||||||
|
|
||||||
--enable-arm-neon=yes
|
|
||||||
--enable-mips-msa=yes
|
|
||||||
--enable-intel-sse=yes
|
|
||||||
--enable-powerpc-vsx=yes
|
|
||||||
--enable-riscv-rvv=yes
|
|
||||||
|
|
||||||
or enable them all at once with
|
|
||||||
|
|
||||||
--enable-hardware-optimizations=yes
|
|
||||||
|
|
||||||
or, if you are not using "configure", you can use one
|
|
||||||
or more of
|
|
||||||
|
|
||||||
CPPFLAGS += "-DPNG_ARM_NEON"
|
|
||||||
CPPFLAGS += "-DPNG_MIPS_MSA"
|
|
||||||
CPPFLAGS += "-DPNG_INTEL_SSE"
|
|
||||||
CPPFLAGS += "-DPNG_POWERPC_VSX"
|
|
||||||
CPPFLAGS += "-DPNG_RISCV_RVV"
|
|
||||||
|
|
||||||
See for example scripts/makefile.linux-opt
|
|
||||||
|
|
||||||
If you wish to avoid using them,
|
|
||||||
you can disable them via the configure option
|
|
||||||
|
|
||||||
--disable-hardware-optimizations
|
|
||||||
|
|
||||||
to disable them all, or
|
|
||||||
|
|
||||||
--enable-intel-sse=no
|
|
||||||
|
|
||||||
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_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_RISCV_RVV=no
|
|
||||||
|
|
||||||
or disable them all at once with
|
|
||||||
|
|
||||||
cmake . -DPNG_HARDWARE_OPTIMIZATIONS=no
|
|
||||||
|
|
||||||
XIII. Changes to the build and configuration of libpng in libpng-1.5.x
|
|
||||||
|
|
||||||
Details of internal changes to the library code can be found in the CHANGES
|
Details of internal changes to the library code can be found in the CHANGES
|
||||||
file and in the GIT repository logs. These will be of no concern to the vast
|
file and in the GIT repository logs. These will be of no concern to the vast
|
||||||
@ -424,7 +363,7 @@ $PREFIX/include directory). Do not edit pnglibconf.h after you have built
|
|||||||
libpng, because than the settings would not accurately reflect the settings
|
libpng, because than the settings would not accurately reflect the settings
|
||||||
that were used to build libpng.
|
that were used to build libpng.
|
||||||
|
|
||||||
XIV. Setjmp/longjmp issues
|
XV. Setjmp/longjmp issues
|
||||||
|
|
||||||
Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp()
|
Libpng uses setjmp()/longjmp() for error handling. Unfortunately setjmp()
|
||||||
is known to be not thread-safe on some platforms and we don't know of
|
is known to be not thread-safe on some platforms and we don't know of
|
||||||
@ -437,12 +376,7 @@ configure libpng with PNG_NO_SETJMP in your pngusr.dfa file, with
|
|||||||
|
|
||||||
in your pnglibconf.h or pngusr.h.
|
in your pnglibconf.h or pngusr.h.
|
||||||
|
|
||||||
Starting with libpng-1.6.0, the library included a "simplified API".
|
XVI. Common linking failures
|
||||||
This requires setjmp/longjmp, so you must either build the library
|
|
||||||
with PNG_SETJMP_SUPPORTED defined, or with PNG_SIMPLIFIED_READ_SUPPORTED
|
|
||||||
and PNG_SIMPLIFIED_WRITE_SUPPORTED undefined.
|
|
||||||
|
|
||||||
XV. Common linking failures
|
|
||||||
|
|
||||||
If your application fails to find libpng or zlib entries while linking:
|
If your application fails to find libpng or zlib entries while linking:
|
||||||
|
|
||||||
@ -454,13 +388,12 @@ If your application fails to find libpng or zlib entries while linking:
|
|||||||
If you are using the vstudio project, observe the WARNING in
|
If you are using the vstudio project, observe the WARNING in
|
||||||
project/vstudio/README.txt.
|
project/vstudio/README.txt.
|
||||||
|
|
||||||
XVI. Other sources of information about libpng:
|
XVII. Other sources of information about libpng:
|
||||||
|
|
||||||
Further information can be found in the README and libpng-manual.txt
|
Further information can be found in the README and libpng-manual.txt
|
||||||
files, in the individual makefiles, in png.h, and the manual pages
|
files, in the individual makefiles, in png.h, and the manual pages
|
||||||
libpng.3 and png.5.
|
libpng.3 and png.5.
|
||||||
|
|
||||||
Copyright (c) 2022 Cosmin Truta
|
|
||||||
Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson
|
Copyright (c) 1998-2002,2006-2016 Glenn Randers-Pehrson
|
||||||
This document is released under the libpng license.
|
This document is released under the libpng license.
|
||||||
For conditions of distribution and use, see the disclaimer
|
For conditions of distribution and use, see the disclaimer
|
||||||
|
173
LICENSE
173
LICENSE
@ -1,82 +1,49 @@
|
|||||||
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
|
||||||
=========================================
|
|
||||||
|
|
||||||
PNG Reference Library License version 2
|
This copy of the libpng notices is provided for your convenience. In case of
|
||||||
---------------------------------------
|
any discrepancy between this copy and the notices in the file png.h that is
|
||||||
|
included in the libpng distribution, the latter shall prevail.
|
||||||
|
|
||||||
* Copyright (c) 1995-2025 The PNG Reference Library Authors.
|
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||||
* 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.
|
|
||||||
|
|
||||||
The software is supplied "as is", without warranty of any kind,
|
If you modify libpng you may insert additional notices immediately following
|
||||||
express or implied, including, without limitation, the warranties
|
this sentence.
|
||||||
of merchantability, fitness for a particular purpose, title, and
|
|
||||||
non-infringement. In no event shall the Copyright owners, or
|
|
||||||
anyone distributing the software, be liable for any damages or
|
|
||||||
other liability, whether in contract, tort or otherwise, arising
|
|
||||||
from, out of, or in connection with the software, or the use or
|
|
||||||
other dealings in the software, even if advised of the possibility
|
|
||||||
of such damage.
|
|
||||||
|
|
||||||
Permission is hereby granted to use, copy, modify, and distribute
|
This code is released under the libpng license.
|
||||||
this software, or portions hereof, for any purpose, without fee,
|
|
||||||
subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you
|
libpng versions 1.0.7, July 1, 2000 through 1.5.29, August 24, 2017 are
|
||||||
must not claim that you wrote the original software. If you
|
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
|
||||||
use this software in a product, an acknowledgment in the product
|
|
||||||
documentation would be appreciated, but is not required.
|
|
||||||
|
|
||||||
2. Altered source versions must be plainly marked as such, and must
|
|
||||||
not be misrepresented as being the original software.
|
|
||||||
|
|
||||||
3. This Copyright notice may not be removed or altered from any
|
|
||||||
source or altered source distribution.
|
|
||||||
|
|
||||||
|
|
||||||
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
|
|
||||||
-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
|
|
||||||
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
|
|
||||||
derived from libpng-1.0.6, and are distributed according to the same
|
derived from libpng-1.0.6, and are distributed according to the same
|
||||||
disclaimer and license as libpng-1.0.6 with the following individuals
|
disclaimer and license as libpng-1.0.6 with the following individuals
|
||||||
added to the list of Contributing Authors:
|
added to the list of Contributing Authors:
|
||||||
|
|
||||||
Simon-Pierre Cadieux
|
Simon-Pierre Cadieux
|
||||||
Eric S. Raymond
|
Eric S. Raymond
|
||||||
Mans Rullgard
|
Mans Rullgard
|
||||||
Cosmin Truta
|
Cosmin Truta
|
||||||
Gilles Vollant
|
Gilles Vollant
|
||||||
James Yu
|
|
||||||
Mandar Sahastrabuddhe
|
|
||||||
Google Inc.
|
|
||||||
Vadim Barkov
|
|
||||||
|
|
||||||
and with the following additions to the disclaimer:
|
and with the following additions to the disclaimer:
|
||||||
|
|
||||||
There is no warranty against interference with your enjoyment of
|
There is no warranty against interference with your enjoyment of the
|
||||||
the library or against infringement. There is no warranty that our
|
library or against infringement. There is no warranty that our
|
||||||
efforts or the library will fulfill any of your particular purposes
|
efforts or the library will fulfill any of your particular purposes
|
||||||
or needs. This library is provided with all faults, and the entire
|
or needs. This library is provided with all faults, and the entire
|
||||||
risk of satisfactory quality, performance, accuracy, and effort is
|
risk of satisfactory quality, performance, accuracy, and effort is with
|
||||||
with the user.
|
the user.
|
||||||
|
|
||||||
Some files in the "contrib" directory and some configure-generated
|
Some files in the "contrib" directory and some configure-generated
|
||||||
files that are distributed with libpng have other copyright owners, and
|
files that are distributed with libpng have other copyright owners and
|
||||||
are released under other open source licenses.
|
are released under other open source licenses.
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
|
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
|
||||||
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
|
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
|
||||||
libpng-0.96, and are distributed according to the same disclaimer and
|
libpng-0.96, and are distributed according to the same disclaimer and
|
||||||
license as libpng-0.96, with the following individuals added to the
|
license as libpng-0.96, with the following individuals added to the list
|
||||||
list of Contributing Authors:
|
of Contributing Authors:
|
||||||
|
|
||||||
Tom Lane
|
Tom Lane
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
Willem van Schaik
|
Willem van Schaik
|
||||||
|
|
||||||
libpng versions 0.89, June 1996, through 0.96, May 1997, are
|
libpng versions 0.89, June 1996, through 0.96, May 1997, are
|
||||||
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
|
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
|
||||||
@ -84,14 +51,14 @@ and are distributed according to the same disclaimer and license as
|
|||||||
libpng-0.88, with the following individuals added to the list of
|
libpng-0.88, with the following individuals added to the list of
|
||||||
Contributing Authors:
|
Contributing Authors:
|
||||||
|
|
||||||
John Bowler
|
John Bowler
|
||||||
Kevin Bracey
|
Kevin Bracey
|
||||||
Sam Bushell
|
Sam Bushell
|
||||||
Magnus Holmgren
|
Magnus Holmgren
|
||||||
Greg Roelofs
|
Greg Roelofs
|
||||||
Tom Tanner
|
Tom Tanner
|
||||||
|
|
||||||
Some files in the "scripts" directory have other copyright owners,
|
Some files in the "scripts" directory have other copyright owners
|
||||||
but are released under this license.
|
but are released under this license.
|
||||||
|
|
||||||
libpng versions 0.5, May 1995, through 0.88, January 1996, are
|
libpng versions 0.5, May 1995, through 0.88, January 1996, are
|
||||||
@ -100,35 +67,63 @@ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
|||||||
For the purposes of this copyright and license, "Contributing Authors"
|
For the purposes of this copyright and license, "Contributing Authors"
|
||||||
is defined as the following set of individuals:
|
is defined as the following set of individuals:
|
||||||
|
|
||||||
Andreas Dilger
|
Andreas Dilger
|
||||||
Dave Martindale
|
Dave Martindale
|
||||||
Guy Eric Schalnat
|
Guy Eric Schalnat
|
||||||
Paul Schmidt
|
Paul Schmidt
|
||||||
Tim Wegner
|
Tim Wegner
|
||||||
|
|
||||||
The PNG Reference Library is supplied "AS IS". The Contributing
|
The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
||||||
Authors and Group 42, Inc. disclaim all warranties, expressed or
|
and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||||
implied, including, without limitation, the warranties of
|
including, without limitation, the warranties of merchantability and of
|
||||||
merchantability and of fitness for any purpose. The Contributing
|
fitness for any purpose. The Contributing Authors and Group 42, Inc.
|
||||||
Authors and Group 42, Inc. assume no liability for direct, indirect,
|
assume no liability for direct, indirect, incidental, special, exemplary,
|
||||||
incidental, special, exemplary, or consequential damages, which may
|
or consequential damages, which may result from the use of the PNG
|
||||||
result from the use of the PNG Reference Library, even if advised of
|
Reference Library, even if advised of the possibility of such damage.
|
||||||
the possibility of such damage.
|
|
||||||
|
|
||||||
Permission is hereby granted to use, copy, modify, and distribute this
|
Permission is hereby granted to use, copy, modify, and distribute this
|
||||||
source code, or portions hereof, for any purpose, without fee, subject
|
source code, or portions hereof, for any purpose, without fee, subject
|
||||||
to the following restrictions:
|
to the following restrictions:
|
||||||
|
|
||||||
1. The origin of this source code must not be misrepresented.
|
1. The origin of this source code must not be misrepresented.
|
||||||
|
|
||||||
2. Altered versions must be plainly marked as such and must not
|
2. Altered versions must be plainly marked as such and must not
|
||||||
be misrepresented as being the original source.
|
be misrepresented as being the original source.
|
||||||
|
|
||||||
3. This Copyright notice may not be removed or altered from any
|
3. This Copyright notice may not be removed or altered from any
|
||||||
source or altered source distribution.
|
source or altered source distribution.
|
||||||
|
|
||||||
The Contributing Authors and Group 42, Inc. specifically permit,
|
The Contributing Authors and Group 42, Inc. specifically permit, without
|
||||||
without fee, and encourage the use of this source code as a component
|
fee, and encourage the use of this source code as a component to
|
||||||
to supporting the PNG file format in commercial products. If you use
|
supporting the PNG file format in commercial products. If you use this
|
||||||
this source code in a product, acknowledgment is not required but would
|
source code in a product, acknowledgment is not required but would be
|
||||||
be appreciated.
|
appreciated.
|
||||||
|
|
||||||
|
END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
|
||||||
|
|
||||||
|
TRADEMARK:
|
||||||
|
|
||||||
|
The name "libpng" has not been registered by the Copyright owner
|
||||||
|
as a trademark in any jurisdiction. However, because libpng has
|
||||||
|
been distributed and maintained world-wide, continually since 1995,
|
||||||
|
the Copyright owner claims "common-law trademark protection" in any
|
||||||
|
jurisdiction where common-law trademark is recognized.
|
||||||
|
|
||||||
|
OSI CERTIFICATION:
|
||||||
|
|
||||||
|
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
|
||||||
|
a certification mark of the Open Source Initiative. OSI has not addressed
|
||||||
|
the additional disclaimers inserted at version 1.0.7.
|
||||||
|
|
||||||
|
EXPORT CONTROL:
|
||||||
|
|
||||||
|
The Copyright owner believes that the Export Control Classification
|
||||||
|
Number (ECCN) for libpng is EAR99, which means not subject to export
|
||||||
|
controls or International Traffic in Arms Regulations (ITAR) because
|
||||||
|
it is open source, publicly available software, that does not contain
|
||||||
|
any encryption software. See the EAR, paragraphs 734.3(b)(3) and
|
||||||
|
734.7(b).
|
||||||
|
|
||||||
|
Glenn Randers-Pehrson
|
||||||
|
glennrp at users.sourceforge.net
|
||||||
|
August 24, 2017
|
||||||
|
259
Makefile.am
259
Makefile.am
@ -1,94 +1,28 @@
|
|||||||
# Makefile.am, the source file for Makefile.in (and hence Makefile), is
|
# Makefile.am:
|
||||||
|
# Source file for Makefile.in (and hence Makefile)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2025 Cosmin Truta
|
|
||||||
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
|
||||||
#
|
|
||||||
# This code is released under the libpng license.
|
|
||||||
# For conditions of distribution and use, see the disclaimer
|
|
||||||
# and license in png.h
|
|
||||||
|
|
||||||
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I scripts/autoconf
|
# libpng does not follow GNU file name conventions
|
||||||
|
|
||||||
|
# "color-tests" requires automake 1.11.1 or later. Enable it if you like,
|
||||||
|
# to get red "FAIL" and green "PASS" notations during tests.
|
||||||
|
# AUTOMAKE_OPTIONS = foreign color-tests
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
# test programs - run on make check, make distcheck
|
# test programs - run on make check, make distcheck
|
||||||
if ENABLE_TESTS
|
TESTS_ENVIRONMENT= srcdir=$(srcdir)
|
||||||
check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp
|
check_PROGRAMS= pngtest
|
||||||
if HAVE_CLOCK_GETTIME
|
|
||||||
check_PROGRAMS += timepng
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
check_PROGRAMS=
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Utilities - installed
|
|
||||||
if ENABLE_TOOLS
|
|
||||||
bin_PROGRAMS= pngfix png-fix-itxt
|
|
||||||
else
|
|
||||||
bin_PROGRAMS=
|
|
||||||
endif
|
|
||||||
|
|
||||||
# This ensures that pnglibconf.h gets built at the start of 'make all' or
|
|
||||||
# 'make check', but it does not add dependencies to the individual programs,
|
|
||||||
# this is done below.
|
|
||||||
#
|
|
||||||
# IMPORTANT: always add the object modules of new programs to the list below
|
|
||||||
# because otherwise the sequence 'configure; make new-program' will *sometimes*
|
|
||||||
# result in the installed (system) pnglibconf.h being used and the result is
|
|
||||||
# always wrong and always very confusing.
|
|
||||||
BUILT_SOURCES = pnglibconf.h
|
|
||||||
|
|
||||||
if ENABLE_TESTS
|
|
||||||
pngtest_SOURCES = pngtest.c
|
pngtest_SOURCES = pngtest.c
|
||||||
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
TESTS = test-pngtest.sh
|
||||||
|
|
||||||
|
# Only do the following if the contrib directory is present.
|
||||||
|
check_PROGRAMS+= pngvalid
|
||||||
pngvalid_SOURCES = contrib/libtests/pngvalid.c
|
pngvalid_SOURCES = contrib/libtests/pngvalid.c
|
||||||
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
|
TESTS += test-pngvalid-simple.sh test-pngvalid-full.sh
|
||||||
pngstest_SOURCES = contrib/libtests/pngstest.c
|
|
||||||
pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|
||||||
|
|
||||||
pngunknown_SOURCES = contrib/libtests/pngunknown.c
|
|
||||||
pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|
||||||
|
|
||||||
pngimage_SOURCES = contrib/libtests/pngimage.c
|
|
||||||
pngimage_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|
||||||
|
|
||||||
timepng_SOURCES = contrib/libtests/timepng.c
|
|
||||||
timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|
||||||
|
|
||||||
pngcp_SOURCES = contrib/tools/pngcp.c
|
|
||||||
pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_TOOLS
|
|
||||||
pngfix_SOURCES = contrib/tools/pngfix.c
|
|
||||||
pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
|
||||||
|
|
||||||
png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Generally these are single line shell scripts to run a test with a particular
|
|
||||||
# set of parameters:
|
|
||||||
if ENABLE_TESTS
|
|
||||||
TESTS =\
|
|
||||||
tests/pngtest-all\
|
|
||||||
tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\
|
|
||||||
tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\
|
|
||||||
tests/pngvalid-gamma-expand16-background\
|
|
||||||
tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\
|
|
||||||
tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\
|
|
||||||
tests/pngvalid-progressive-size\
|
|
||||||
tests/pngvalid-progressive-interlace-standard\
|
|
||||||
tests/pngvalid-transform\
|
|
||||||
tests/pngvalid-progressive-standard tests/pngvalid-standard\
|
|
||||||
tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\
|
|
||||||
tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\
|
|
||||||
tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\
|
|
||||||
tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\
|
|
||||||
tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
|
|
||||||
tests/pngimage-quick tests/pngimage-full
|
|
||||||
endif
|
|
||||||
|
|
||||||
# man pages
|
# man pages
|
||||||
dist_man_MANS= libpng.3 libpngpf.3 png.5
|
dist_man_MANS= libpng.3 libpngpf.3 png.5
|
||||||
@ -108,50 +42,13 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
|||||||
|
|
||||||
if PNG_ARM_NEON
|
if PNG_ARM_NEON
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
|
||||||
arm/filter_neon_intrinsics.c \
|
arm/filter_neon.S
|
||||||
arm/palette_neon_intrinsics.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if PNG_MIPS_MSA
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c\
|
|
||||||
mips/filter_msa_intrinsics.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if PNG_MIPS_MMI
|
|
||||||
if !PNG_MIPS_MSA
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c
|
|
||||||
endif
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/filter_mmi_inline_assembly.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if PNG_INTEL_SSE
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += intel/intel_init.c\
|
|
||||||
intel/filter_sse2_intrinsics.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if PNG_POWERPC_VSX
|
|
||||||
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
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
||||||
|
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||||
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
|
||||||
-version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0
|
-version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0
|
||||||
|
|
||||||
@ -170,14 +67,6 @@ else
|
|||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
||||||
endif
|
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
|
|
||||||
|
|
||||||
#distribute headers in /usr/include/libpng/*
|
#distribute headers in /usr/include/libpng/*
|
||||||
pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
|
pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
|
||||||
pkginclude_HEADERS= png.h pngconf.h
|
pkginclude_HEADERS= png.h pngconf.h
|
||||||
@ -188,33 +77,26 @@ nodist_pkginclude_HEADERS= pnglibconf.h
|
|||||||
pkgconfigdir = @pkgconfigdir@
|
pkgconfigdir = @pkgconfigdir@
|
||||||
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
|
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
|
||||||
|
|
||||||
# Extra source distribution files, '${srcdir}' is used below to stop build files
|
#extra source distribution files.
|
||||||
# from those directories being included. This only works if the configure is
|
|
||||||
# not done in the source directory!
|
|
||||||
EXTRA_DIST= \
|
EXTRA_DIST= \
|
||||||
ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \
|
ANNOUNCE CHANGES INSTALL LICENSE README TODO \
|
||||||
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
|
pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
|
||||||
${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
|
${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
|
||||||
$(TESTS) $(XFAIL_TESTS) tests/pngstest \
|
$(TESTS) \
|
||||||
CMakeLists.txt example.c libpng-manual.txt
|
CMakeLists.txt example.c libpng-manual.txt
|
||||||
|
|
||||||
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk
|
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk
|
||||||
|
|
||||||
CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
|
CLEANFILES= dfn.c dfn?.out *.out.? scripts/*.out.? pngout.png \
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
|
||||||
check.new pnglibconf.h pngprefix.h symbols.new pngtest-log.txt \
|
check.new pnglibconf.h symbols.new pngtest-log.txt \
|
||||||
pnglibconf.out pnglibconf.c pnglibconf.pre pnglibconf.dfn \
|
pnglibconf.c pnglibconf.out pnglibconf.pre \
|
||||||
$(SCRIPT_CLEANFILES)
|
$(SCRIPT_CLEANFILES)
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
|
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
|
||||||
config.sub configure depcomp install-sh ltmain.sh missing
|
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 target_CFLAGS is specified; that will take precedence over
|
|
||||||
# AM_CFLAGS)
|
|
||||||
PNG_COPTS = @PNG_COPTS@
|
|
||||||
AM_CFLAGS = ${PNG_COPTS}
|
|
||||||
|
|
||||||
# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe
|
# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe
|
||||||
# other operating systems (NeXT?) the C preprocessor selected by configure
|
# other operating systems (NeXT?) the C preprocessor selected by configure
|
||||||
# checks input tokens for validity - effectively it performs part of the ANSI-C
|
# checks input tokens for validity - effectively it performs part of the ANSI-C
|
||||||
@ -231,9 +113,7 @@ $(PNGLIB_BASENAME)-config: libpng-config
|
|||||||
cp libpng-config $@
|
cp libpng-config $@
|
||||||
|
|
||||||
scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h
|
scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h
|
||||||
scripts/prefix.out: png.h pngconf.h pnglibconf.out
|
|
||||||
scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt
|
scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt
|
||||||
scripts/intprefix.out: pnglibconf.h
|
|
||||||
|
|
||||||
libpng.sym: scripts/sym.out
|
libpng.sym: scripts/sym.out
|
||||||
rm -f $@
|
rm -f $@
|
||||||
@ -241,60 +121,19 @@ libpng.sym: scripts/sym.out
|
|||||||
libpng.vers: scripts/vers.out
|
libpng.vers: scripts/vers.out
|
||||||
rm -f $@
|
rm -f $@
|
||||||
cp $? $@
|
cp $? $@
|
||||||
|
|
||||||
if DO_PNG_PREFIX
|
|
||||||
# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix.
|
|
||||||
# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual
|
|
||||||
# implementation of the macro).
|
|
||||||
pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst
|
|
||||||
rm -f $@
|
|
||||||
$(AWK) 's==0 && NR>1{print prev}\
|
|
||||||
s==0{prev=$$0}\
|
|
||||||
s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\
|
|
||||||
s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\
|
|
||||||
END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\
|
|
||||||
s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8
|
|
||||||
mv pnglibconf.tf8 $@
|
|
||||||
|
|
||||||
pngprefix.h: scripts/intprefix.out
|
|
||||||
rm -f pngprefix.tf1
|
|
||||||
$(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1
|
|
||||||
mv pngprefix.tf1 $@
|
|
||||||
else
|
|
||||||
pnglibconf.h: pnglibconf.out
|
pnglibconf.h: pnglibconf.out
|
||||||
rm -f $@
|
rm -f $@
|
||||||
cp $? $@
|
cp $? $@
|
||||||
|
|
||||||
pngprefix.h: # is empty
|
|
||||||
:>$@
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(srcdir)/scripts/pnglibconf.h.prebuilt:
|
$(srcdir)/scripts/pnglibconf.h.prebuilt:
|
||||||
@echo "Attempting to build $@" >&2
|
@echo "Attempting to build $@" >&2
|
||||||
@echo "This is a machine generated file, but if you want to make" >&2
|
@echo "This is a machine generated file, but if you want to make" >&2
|
||||||
@echo "a new one simply make 'scripts/pnglibconf.out', copy that" >&2
|
@echo "a new one simply make 'scripts/pnglibconf.out' and copy that" >&2
|
||||||
@echo "AND set PNG_ZLIB_VERNUM to 0 (you MUST do this)" >&2
|
|
||||||
@exit 1
|
@exit 1
|
||||||
|
|
||||||
# The following is necessary to ensure that the local pnglibconf.h is used, not
|
# The following is necessary to ensure that the local pnglibconf.h is used, not
|
||||||
# an installed one (this can happen immediately after on a clean system if
|
# an installed one (this can happen immediately after on a clean system if
|
||||||
# 'make test' is the first thing the user does.) Only files which include
|
# 'make test' is the first thing the user does.)
|
||||||
# one of the png source files (typically png.h or pngpriv.h) need to be listed
|
contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
|
||||||
# here:
|
|
||||||
pngtest.o: pnglibconf.h
|
|
||||||
|
|
||||||
contrib/libtests/makepng.o: pnglibconf.h
|
|
||||||
contrib/libtests/pngstest.o: pnglibconf.h
|
|
||||||
contrib/libtests/pngunknown.o: pnglibconf.h
|
|
||||||
contrib/libtests/pngimage.o: pnglibconf.h
|
|
||||||
contrib/libtests/pngvalid.o: pnglibconf.h
|
|
||||||
contrib/libtests/readpng.o: pnglibconf.h
|
|
||||||
contrib/libtests/tarith.o: pnglibconf.h
|
|
||||||
contrib/libtests/timepng.o: pnglibconf.h
|
|
||||||
|
|
||||||
contrib/tools/makesRGB.o: pnglibconf.h
|
|
||||||
contrib/tools/pngfix.o: pnglibconf.h
|
|
||||||
contrib/tools/pngcp.o: pnglibconf.h
|
|
||||||
|
|
||||||
# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
|
# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
|
||||||
# be built with PNG_USE_READ_MACROS; this prevents the read macros from
|
# be built with PNG_USE_READ_MACROS; this prevents the read macros from
|
||||||
@ -304,10 +143,6 @@ SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
|
|||||||
-DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\
|
-DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\
|
||||||
-DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE
|
-DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE
|
||||||
|
|
||||||
if DO_PNG_PREFIX
|
|
||||||
SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@'
|
|
||||||
endif
|
|
||||||
|
|
||||||
.c.out:
|
.c.out:
|
||||||
rm -f $@ $*.tf[12]
|
rm -f $@ $*.tf[12]
|
||||||
test -d scripts || mkdir scripts || test -d scripts
|
test -d scripts || mkdir scripts || test -d scripts
|
||||||
@ -316,42 +151,40 @@ endif
|
|||||||
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2
|
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2
|
||||||
rm -f $*.tf1
|
rm -f $*.tf1
|
||||||
mv $*.tf2 $@
|
mv $*.tf2 $@
|
||||||
|
|
||||||
# The .c file for pnglibconf.h is machine generated
|
# The .c file for pnglibconf.h is machine generated
|
||||||
pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
||||||
rm -f $@ $*.tf[45]
|
|
||||||
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\
|
rm -f $@ pnglibconf.pre $@.?
|
||||||
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
$(AWK) -f ${srcdir}/scripts/options.awk out="pnglibconf.pre"\
|
||||||
|
version=search ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
||||||
${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2
|
${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2
|
||||||
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2
|
$(AWK) -f ${srcdir}/scripts/options.awk out="$@.1" pnglibconf.pre 1>&2
|
||||||
rm $*.tf4
|
mv $@.1 $@
|
||||||
mv $*.tf5 $@
|
|
||||||
|
|
||||||
# Symbol checks (.def and .out files should match)
|
# Symbol checks (.def and .out files should match)
|
||||||
scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
|
scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
|
||||||
|
|
||||||
.out.chk:
|
.out.chk:
|
||||||
rm -f $@ $*.new
|
rm -f $@ symbols.new
|
||||||
$(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
|
$(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
|
||||||
of="$*.new" $< >&2
|
$< >&2
|
||||||
mv $*.new $@
|
mv symbols.new $@
|
||||||
|
|
||||||
# used on demand to regenerate the standard header, CPPFLAGS should
|
# used on demand to regenerate the standard header, CPPFLAGS should
|
||||||
# be empty - no non-standard defines
|
# be empty - no non-standard defines
|
||||||
scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
||||||
rm -f $@ pnglibconf.tf[67]
|
rm -f $@ dfn?.out
|
||||||
test -z "$(CPPFLAGS)"
|
test -z "$(CPPFLAGS)"
|
||||||
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
||||||
$(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\
|
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out logunsupported=1\
|
||||||
logunsupported=1 version=search ${srcdir}/pngconf.h -\
|
version=search ${srcdir}/pngconf.h -\
|
||||||
${srcdir}/scripts/pnglibconf.dfa 1>&2
|
${srcdir}/scripts/pnglibconf.dfa 1>&2
|
||||||
$(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\
|
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
|
||||||
pnglibconf.tf6 1>&2
|
rm dfn1.out
|
||||||
rm pnglibconf.tf6
|
mv dfn2.out $@
|
||||||
mv pnglibconf.tf7 $@
|
|
||||||
|
|
||||||
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
|
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
|
||||||
pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h
|
pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h
|
||||||
|
|
||||||
test: check-am
|
test: check-am
|
||||||
|
|
||||||
|
1814
Makefile.in
1814
Makefile.in
File diff suppressed because it is too large
Load Diff
341
README
341
README
@ -1,88 +1,56 @@
|
|||||||
README for libpng version 1.6.51.git
|
README for libpng version 1.5.29 - August 24, 2017 (shared library 15.0)
|
||||||
====================================
|
See the note about version numbers near the top of png.h
|
||||||
|
|
||||||
See the note about version numbers near the top of `png.h`.
|
See INSTALL for instructions on how to install libpng.
|
||||||
See `INSTALL` for instructions on how to install libpng.
|
|
||||||
|
|
||||||
Libpng comes in several distribution formats. Get `libpng-*.tar.gz`
|
Libpng comes in several distribution formats. Get libpng-*.tar.gz or
|
||||||
or `libpng-*.tar.xz` if you want UNIX-style line endings in the text
|
libpng-*.tar.xz or if you want UNIX-style line endings in the text files,
|
||||||
files, or `lpng*.7z` or `lpng*.zip` if you want DOS-style line endings.
|
or lpng*.7z or lpng*.zip if you want DOS-style line endings.
|
||||||
|
|
||||||
For a detailed description on using libpng, read `libpng-manual.txt`.
|
Version 0.89 was the first official release of libpng. Don't let the
|
||||||
For examples of libpng in a program, see `example.c` and `pngtest.c`.
|
fact that it's the first release fool you. The libpng library has been in
|
||||||
For usage information and restrictions (what little they are) on libpng,
|
extensive use and testing since mid-1995. By late 1997 it had
|
||||||
see `png.h`. For a description on using zlib (the compression library
|
finally gotten to the stage where there hadn't been significant
|
||||||
used by libpng) and zlib's restrictions, see `zlib.h`.
|
changes to the API in some time, and people have a bad feeling about
|
||||||
|
libraries with versions < 1.0. Version 1.0.0 was released in
|
||||||
|
March 1998.
|
||||||
|
|
||||||
You should use zlib 1.0.4 or later to run this, but it _may_ work with
|
****
|
||||||
versions as old as zlib 0.95. Even so, there are bugs in older zlib
|
Note that some of the changes to the png_info structure render this
|
||||||
versions which can cause the output of invalid compression streams for
|
|
||||||
some images.
|
|
||||||
|
|
||||||
You should also note that zlib is a compression library that is useful
|
|
||||||
for more things than just PNG files. You can use zlib as a drop-in
|
|
||||||
replacement for `fread()` and `fwrite()`, if you are so inclined.
|
|
||||||
|
|
||||||
zlib should be available at the same place that libpng is, or at
|
|
||||||
https://zlib.net .
|
|
||||||
|
|
||||||
You may also want a copy of the PNG specification. It is available
|
|
||||||
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
|
|
||||||
these at http://www.libpng.org/pub/png/pngdocs.html .
|
|
||||||
|
|
||||||
This code is currently being archived at https://libpng.sourceforge.io
|
|
||||||
in the download area, and at http://libpng.download/src .
|
|
||||||
|
|
||||||
This release, based in a large way on Glenn's, Guy's and Andreas'
|
|
||||||
earlier work, was created and will be supported by myself and the PNG
|
|
||||||
development group.
|
|
||||||
|
|
||||||
Send comments, corrections and commendations to `png-mng-implement`
|
|
||||||
at `lists.sourceforge.net`. (Subscription is required; visit
|
|
||||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
|
||||||
to subscribe.)
|
|
||||||
|
|
||||||
Send general questions about the PNG specification to `png-mng-misc`
|
|
||||||
at `lists.sourceforge.net`. (Subscription is required; visit
|
|
||||||
https://lists.sourceforge.net/lists/listinfo/png-mng-misc
|
|
||||||
to subscribe.)
|
|
||||||
|
|
||||||
Historical notes
|
|
||||||
----------------
|
|
||||||
|
|
||||||
The libpng library has been in extensive use and testing since mid-1995.
|
|
||||||
Version 0.89, published a year later, was the first official release.
|
|
||||||
By late 1997, it had finally gotten to the stage where there hadn't
|
|
||||||
been significant changes to the API in some time, and people have a bad
|
|
||||||
feeling about libraries with versions below 1.0. Version 1.0.0 was
|
|
||||||
released in March 1998.
|
|
||||||
|
|
||||||
Note that some of the changes to the `png_info` structure render this
|
|
||||||
version of the library binary incompatible with libpng-0.89 or
|
version of the library binary incompatible with libpng-0.89 or
|
||||||
earlier versions if you are using a shared library. The type of the
|
earlier versions if you are using a shared library. The type of the
|
||||||
`filler` parameter for `png_set_filler()` has changed from `png_byte`
|
"filler" parameter for png_set_filler() has changed from png_byte to
|
||||||
to `png_uint_32`, which will affect shared-library applications that
|
png_uint_32, which will affect shared-library applications that use
|
||||||
use this function.
|
this function.
|
||||||
|
|
||||||
To avoid problems with changes to the internals of the `info_struct`,
|
To avoid problems with changes to the internals of the png info_struct,
|
||||||
new APIs have been made available in 0.95 to avoid direct application
|
new APIs have been made available in 0.95 to avoid direct application
|
||||||
access to `info_ptr`. These functions are the `png_set_<chunk>` and
|
access to info_ptr. These functions are the png_set_<chunk> and
|
||||||
`png_get_<chunk>` functions. These functions should be used when
|
png_get_<chunk> functions. These functions should be used when
|
||||||
accessing/storing the `info_struct` data, rather than manipulating it
|
accessing/storing the info_struct data, rather than manipulating it
|
||||||
directly, to avoid such problems in the future.
|
directly, to avoid such problems in the future.
|
||||||
|
|
||||||
It is important to note that the APIs did not make current programs
|
It is important to note that the APIs did not make current programs
|
||||||
that access the info struct directly incompatible with the new
|
that access the info struct directly incompatible with the new
|
||||||
library, through libpng-1.2.x. In libpng-1.4.x, which was meant to
|
library, through libpng-1.2.x. In libpng-1.4.x, which was meant to
|
||||||
be a transitional release, members of the `png_struct` and the
|
be a transitional release, members of the png_struct and the
|
||||||
`info_struct` can still be accessed, but the compiler will issue a
|
info_struct can still be accessed, but the compiler will issue a
|
||||||
warning about deprecated usage. Since libpng-1.5.0, direct access
|
warning about deprecated usage. Since libpng-1.5.0, direct access
|
||||||
to these structs is not allowed, and the definitions of the structs
|
to these structs is not allowed, and the definitions of the structs
|
||||||
reside in private `pngstruct.h` and `pnginfo.h` header files that are
|
reside in private pngstruct.h and pnginfo.h header files that are not
|
||||||
not accessible to applications. It is strongly suggested that new
|
accessible to applications. It is strongly suggested that new
|
||||||
programs use the new APIs (as shown in `example.c` and `pngtest.c`),
|
programs use the new APIs (as shown in example.c and pngtest.c), and
|
||||||
and older programs be converted to the new format, to facilitate
|
older programs be converted to the new format, to facilitate upgrades
|
||||||
upgrades in the future.
|
in the future.
|
||||||
|
****
|
||||||
|
|
||||||
|
Additions since 0.90 include the ability to compile libpng as a
|
||||||
|
Windows DLL, and new APIs for accessing data in the info struct.
|
||||||
|
Experimental functions include the ability to set weighting and cost
|
||||||
|
factors for row filter selection, direct reads of integers from buffers
|
||||||
|
on big-endian processors that support misaligned data access, faster
|
||||||
|
methods of doing alpha composition, and more accurate 16->8 bit color
|
||||||
|
conversion.
|
||||||
|
|
||||||
The additions since 0.89 include the ability to read from a PNG stream
|
The additions since 0.89 include the ability to read from a PNG stream
|
||||||
which has had some (or all) of the signature bytes read by the calling
|
which has had some (or all) of the signature bytes read by the calling
|
||||||
@ -92,93 +60,154 @@ the library action on the detection of chunk CRC errors. It is possible
|
|||||||
to set different actions based on whether the CRC error occurred in a
|
to set different actions based on whether the CRC error occurred in a
|
||||||
critical or an ancillary chunk.
|
critical or an ancillary chunk.
|
||||||
|
|
||||||
The additions since 0.90 include the ability to compile libpng as a
|
The changes made to the library, and bugs fixed are based on discussions
|
||||||
Windows DLL, and new APIs for accessing data in the `info_struct`.
|
on the PNG-implement mailing list and not on material submitted
|
||||||
Experimental functions included the ability to set weighting and cost
|
privately to Guy, Andreas, or Glenn. They will forward any good
|
||||||
factors for row filter selection, direct reads of integers from buffers
|
suggestions to the list.
|
||||||
on big-endian processors that support misaligned data access, faster
|
|
||||||
methods of doing alpha composition, and more accurate 16-to-8 bit color
|
|
||||||
conversion. Some of these experimental functions, such as the weighted
|
|
||||||
filter heuristics, have since been removed.
|
|
||||||
|
|
||||||
Files included in this distribution
|
For a detailed description on using libpng, read libpng-manual.txt. For
|
||||||
-----------------------------------
|
examples of libpng in a program, see example.c and pngtest.c. For usage
|
||||||
|
information and restrictions (what little they are) on libpng, see
|
||||||
|
png.h. For a description on using zlib (the compression library used by
|
||||||
|
libpng) and zlib's restrictions, see zlib.h
|
||||||
|
|
||||||
ANNOUNCE => Announcement of this version, with recent changes
|
I have included a general makefile, as well as several machine and
|
||||||
AUTHORS => List of contributing authors
|
compiler specific ones, but you may have to modify one for your own needs.
|
||||||
CHANGES => Description of changes between libpng versions
|
|
||||||
INSTALL => Instructions to install libpng
|
|
||||||
LICENSE => License to use and redistribute libpng
|
|
||||||
README => This file
|
|
||||||
TODO => Things not implemented in the current library
|
|
||||||
TRADEMARK => Trademark information
|
|
||||||
example.c => Example code for using libpng functions
|
|
||||||
libpng.3 => Manual page for libpng (includes libpng-manual.txt)
|
|
||||||
libpng-manual.txt => Description of libpng and its functions
|
|
||||||
libpngpf.3 => Manual page for libpng's private functions (deprecated)
|
|
||||||
png.5 => Manual page for the PNG format
|
|
||||||
png.c => Basic interface functions common to library
|
|
||||||
png.h => Library function and interface declarations (public)
|
|
||||||
pngpriv.h => Library function and interface declarations (private)
|
|
||||||
pngconf.h => System specific library configuration (public)
|
|
||||||
pngstruct.h => png_struct declaration (private)
|
|
||||||
pnginfo.h => png_info struct declaration (private)
|
|
||||||
pngdebug.h => debugging macros (private)
|
|
||||||
pngerror.c => Error/warning message I/O functions
|
|
||||||
pngget.c => Functions for retrieving info from struct
|
|
||||||
pngmem.c => Memory handling functions
|
|
||||||
pngbar.png => PNG logo, 88x31
|
|
||||||
pngnow.png => PNG logo, 98x31
|
|
||||||
pngpread.c => Progressive reading functions
|
|
||||||
pngread.c => Read data/helper high-level functions
|
|
||||||
pngrio.c => Lowest-level data read I/O functions
|
|
||||||
pngrtran.c => Read data transformation functions
|
|
||||||
pngrutil.c => Read data utility functions
|
|
||||||
pngset.c => Functions for storing data into the info_struct
|
|
||||||
pngtest.c => Library test program
|
|
||||||
pngtest.png => Library test sample image
|
|
||||||
pngtrans.c => Common data transformation functions
|
|
||||||
pngwio.c => Lowest-level write I/O functions
|
|
||||||
pngwrite.c => High-level write functions
|
|
||||||
pngwtran.c => Write data transformations
|
|
||||||
pngwutil.c => Write utility functions
|
|
||||||
arm/ => Optimized code for ARM Neon
|
|
||||||
intel/ => Optimized code for INTEL SSE2
|
|
||||||
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
|
|
||||||
mips-msa/ => Optimized code for the MIPS-MSA platform
|
|
||||||
powerpc-vsx/ => Optimized code for the POWERPC-VSX platform
|
|
||||||
examples/ => Examples of libpng usage
|
|
||||||
gregbook/ => Source code for PNG reading and writing, from
|
|
||||||
"PNG: The Definitive Guide" by Greg Roelofs,
|
|
||||||
O'Reilly, 1999
|
|
||||||
libtests/ => Test programs
|
|
||||||
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
|
|
||||||
projects/ => Project files and workspaces for various IDEs
|
|
||||||
owatcom/ => OpenWatcom project
|
|
||||||
visualc71/ => Microsoft Visual C++ 7.1 workspace
|
|
||||||
vstudio/ => Microsoft Visual Studio workspace
|
|
||||||
scripts/ => Scripts and makefiles for building libpng
|
|
||||||
(see scripts/README.txt for the complete list)
|
|
||||||
tests/ => Test scripts
|
|
||||||
|
|
||||||
Good luck, and happy coding!
|
You should use zlib 1.0.4 or later to run this, but it MAY work with
|
||||||
|
versions as old as zlib 0.95. Even so, there are bugs in older zlib
|
||||||
|
versions which can cause the output of invalid compression streams for
|
||||||
|
some images. You will definitely need zlib 1.0.4 or later if you are
|
||||||
|
taking advantage of the MS-DOS "far" structure allocation for the small
|
||||||
|
and medium memory models. You should also note that zlib is a
|
||||||
|
compression library that is useful for more things than just PNG files.
|
||||||
|
You can use zlib as a drop-in replacement for fread() and fwrite() if
|
||||||
|
you are so inclined.
|
||||||
|
|
||||||
* Cosmin Truta (current maintainer, since 2018)
|
zlib should be available at the same place that libpng is, or at zlib.net.
|
||||||
* Glenn Randers-Pehrson (former maintainer, 1998-2018)
|
|
||||||
* Andreas Eric Dilger (former maintainer, 1996-1997)
|
You may also want a copy of the PNG specification. It is available
|
||||||
* Guy Eric Schalnat (original author and former maintainer, 1995-1996)
|
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
|
||||||
(formerly of Group 42, Inc.)
|
these at http://www.libpng.org/pub/png/pngdocs.html .
|
||||||
|
|
||||||
|
This code is currently being archived at libpng.sourceforge.io in the
|
||||||
|
[DOWNLOAD] area, and at ftp://ftp-osl.osuosl.org/pub/libpng/src . If you
|
||||||
|
can't find it in any of those places, e-mail me, and I'll help you find it.
|
||||||
|
|
||||||
|
I am not a lawyer, but I believe that the Export Control Classification
|
||||||
|
Number (ECCN) for libpng is EAR99, which means not subject to export
|
||||||
|
controls or International Traffic in Arms Regulations (ITAR) because it
|
||||||
|
is open source, publicly available software, that does not contain any
|
||||||
|
encryption software. See the EAR, paragraphs 734.3(b)(3) and 734.7(b).
|
||||||
|
|
||||||
|
If you have any code changes, requests, problems, etc., please e-mail
|
||||||
|
them to me. Also, I'd appreciate any make files or project files,
|
||||||
|
and any modifications you needed to make to get libpng to compile,
|
||||||
|
along with a #define variable to tell what compiler/system you are on.
|
||||||
|
If you needed to add transformations to libpng, or wish libpng would
|
||||||
|
provide the image in a different way, drop me a note (and code, if
|
||||||
|
possible), so I can consider supporting the transformation.
|
||||||
|
Finally, if you get any warning messages when compiling libpng
|
||||||
|
(note: not zlib), and they are easy to fix, I'd appreciate the
|
||||||
|
fix. Please mention "libpng" somewhere in the subject line. Thanks.
|
||||||
|
|
||||||
|
This release was created and will be supported by myself (of course
|
||||||
|
based in a large way on Guy's and Andreas' earlier work), and the PNG
|
||||||
|
development group.
|
||||||
|
|
||||||
|
Send comments/corrections/commendations to png-mng-implement at
|
||||||
|
lists.sourceforge.net (subscription required; visit
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
|
to subscribe) or to glennrp at users.sourceforge.net
|
||||||
|
|
||||||
|
You can't reach Guy, the original libpng author, at the addresses
|
||||||
|
given in previous versions of this document. He and Andreas will
|
||||||
|
read mail addressed to the png-implement list, however.
|
||||||
|
|
||||||
|
Please do not send general questions about PNG. Send them to
|
||||||
|
png-mng-misc at lists.sf.net (subscription required; visit
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/png-mng-misc to
|
||||||
|
subscribe). If you have a question about something
|
||||||
|
in the PNG specification that is related to using libpng, send it
|
||||||
|
to me. Send me any questions that start with "I was using libpng,
|
||||||
|
and ...". If in doubt, send questions to me. I'll bounce them
|
||||||
|
to others, if necessary.
|
||||||
|
|
||||||
|
Please do not send suggestions on how to change PNG. We have
|
||||||
|
been discussing PNG for twenty years now, and it is official and
|
||||||
|
finished. If you have suggestions for libpng, however, I'll
|
||||||
|
gladly listen. Even if your suggestion is not used immediately,
|
||||||
|
it may be used later.
|
||||||
|
|
||||||
|
Files in this distribution:
|
||||||
|
|
||||||
|
ANNOUNCE => Announcement of this version, with recent changes
|
||||||
|
CHANGES => Description of changes between libpng versions
|
||||||
|
KNOWNBUG => List of known bugs and deficiencies
|
||||||
|
LICENSE => License to use and redistribute libpng
|
||||||
|
README => This file
|
||||||
|
TODO => Things not implemented in the current library
|
||||||
|
Y2KINFO => Statement of Y2K compliance
|
||||||
|
example.c => Example code for using libpng functions
|
||||||
|
libpng.3 => manual page for libpng (includes libpng-manual.txt)
|
||||||
|
libpng-manual.txt => Description of libpng and its functions
|
||||||
|
libpngpf.3 => manual page for libpng's private functions
|
||||||
|
png.5 => manual page for the PNG format
|
||||||
|
png.c => Basic interface functions common to library
|
||||||
|
png.h => Library function and interface declarations (public)
|
||||||
|
pngpriv.h => Library function and interface declarations (private)
|
||||||
|
pngconf.h => System specific library configuration (public)
|
||||||
|
pngstruct.h => png_struct declaration (private)
|
||||||
|
pnginfo.h => png_info struct declaration (private)
|
||||||
|
pngdebug.h => debugging macros (private)
|
||||||
|
pngerror.c => Error/warning message I/O functions
|
||||||
|
pngget.c => Functions for retrieving info from struct
|
||||||
|
pngmem.c => Memory handling functions
|
||||||
|
pngbar.png => PNG logo, 88x31
|
||||||
|
pngnow.png => PNG logo, 98x31
|
||||||
|
pngpread.c => Progressive reading functions
|
||||||
|
pngread.c => Read data/helper high-level functions
|
||||||
|
pngrio.c => Lowest-level data read I/O functions
|
||||||
|
pngrtran.c => Read data transformation functions
|
||||||
|
pngrutil.c => Read data utility functions
|
||||||
|
pngset.c => Functions for storing data into the info_struct
|
||||||
|
pngtest.c => Library test program
|
||||||
|
pngtest.png => Library test sample image
|
||||||
|
pngtrans.c => Common data transformation functions
|
||||||
|
pngwio.c => Lowest-level write I/O functions
|
||||||
|
pngwrite.c => High-level write functions
|
||||||
|
pngwtran.c => Write data transformations
|
||||||
|
pngwutil.c => Write utility functions
|
||||||
|
arm => Contains optimized code for the ARM platform
|
||||||
|
contrib => Contributions
|
||||||
|
gregbook => source code for PNG reading and writing, from
|
||||||
|
Greg Roelofs' "PNG: The Definitive Guide",
|
||||||
|
O'Reilly, 1999
|
||||||
|
libtests => Test programs
|
||||||
|
pngminim => Minimal decoder, encoder, and progressive decoder
|
||||||
|
programs demonstrating use of pngusr.dfa
|
||||||
|
pngminus => Simple pnm2png and png2pnm programs
|
||||||
|
pngsuite => Test images
|
||||||
|
visupng => Contains a MSVC workspace for VisualPng
|
||||||
|
projects => Contains project files and workspaces for
|
||||||
|
building a DLL
|
||||||
|
owatcom => Contains a WATCOM project for building libpng
|
||||||
|
visualc71 => Contains a Microsoft Visual C++ (MSVC)
|
||||||
|
workspace for building libpng and zlib
|
||||||
|
vstudio => Contains a Microsoft Visual C++ (MSVC)
|
||||||
|
workspace for building libpng and zlib
|
||||||
|
scripts => Directory containing scripts for building libpng:
|
||||||
|
(see scripts/README.txt for the list of scripts)
|
||||||
|
|
||||||
|
Good luck, and happy coding.
|
||||||
|
|
||||||
|
-Glenn Randers-Pehrson (current maintainer, since 1998)
|
||||||
|
Internet: glennrp at users.sourceforge.net
|
||||||
|
|
||||||
|
-Andreas Eric Dilger (former maintainer, 1996-1997)
|
||||||
|
Internet: adilger at enel.ucalgary.ca
|
||||||
|
Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/
|
||||||
|
|
||||||
|
-Guy Eric Schalnat (original author and former maintainer, 1995-1996)
|
||||||
|
(formerly of Group 42, Inc)
|
||||||
|
Internet: gschal at infinet.com
|
||||||
|
47
TODO
47
TODO
@ -1,22 +1,27 @@
|
|||||||
TODO list for libpng
|
/*
|
||||||
--------------------
|
TODO - list of things to do for libpng:
|
||||||
|
|
||||||
* Fix all defects (duh!)
|
Final bug fixes.
|
||||||
* cHRM transformation.
|
Better C++ wrapper/full C++ implementation?
|
||||||
* Palette creation.
|
Fix problem with C++ and EXTERN "C".
|
||||||
* "grayscale->palette" transformation and "palette->grayscale" detection.
|
cHRM transformation.
|
||||||
* Improved dithering.
|
Remove setjmp/longjmp usage in favor of returning error codes.
|
||||||
* Multi-lingual error and warning message support.
|
Palette creation.
|
||||||
* Complete sRGB transformation. (Currently it simply uses gamma=0.45455.)
|
Add "grayscale->palette" transformation and "palette->grayscale" detection.
|
||||||
* Man pages for function calls.
|
Improved dithering.
|
||||||
* Better documentation.
|
Multi-lingual error and warning message support.
|
||||||
* Better filter selection
|
Complete sRGB transformation (presently it simply uses gamma=0.45455).
|
||||||
(e.g., counting huffman bits/precompression; filter inertia; filter costs).
|
Man pages for function calls.
|
||||||
* Histogram creation.
|
Better documentation.
|
||||||
* Text conversion between different code pages (e.g., Latin-1 to Mac).
|
Better filter selection
|
||||||
* Avoid building gamma tables whenever possible.
|
(counting huffman bits/precompression? filter inertia? filter costs?).
|
||||||
* Greater precision in changing to linear gamma for compositing against
|
Histogram creation.
|
||||||
background, and in doing rgb-to-gray transformations.
|
Text conversion between different code pages (Latin-1 -> Mac and DOS).
|
||||||
* Investigate pre-incremented loop counters and other loop constructions.
|
Avoid building gamma tables whenever possible.
|
||||||
* Interpolated method of handling interlacing.
|
Use greater precision when changing to linear gamma for compositing against
|
||||||
* More validations for libpng transformations.
|
background and doing rgb-to-gray transformation.
|
||||||
|
Investigate pre-incremented loop counters and other loop constructions.
|
||||||
|
Add interpolated method of handling interlacing.
|
||||||
|
Extend pngvalid.c to validate more of the libpng transformations.
|
||||||
|
|
||||||
|
*/
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
TRADEMARK
|
|
||||||
=========
|
|
||||||
|
|
||||||
The name "libpng" has not been registered by the Copyright owners
|
|
||||||
as a trademark in any jurisdiction. However, because libpng has
|
|
||||||
been distributed and maintained world-wide, continually since 1995,
|
|
||||||
the Copyright owners claim "common-law trademark protection" in any
|
|
||||||
jurisdiction where common-law trademark is recognized.
|
|
9639
aclocal.m4
vendored
9639
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
168
arm/arm_init.c
168
arm/arm_init.c
@ -1,59 +1,154 @@
|
|||||||
|
|
||||||
/* arm_init.c - NEON optimised filter functions
|
/* arm_init.c - NEON optimised filter functions
|
||||||
*
|
*
|
||||||
* Copyright (c) 2018-2022 Cosmin Truta
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
|
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
|
* Last changed in libpng 1.6.8 [December 19, 2013]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
* and license in png.h
|
* and license in png.h
|
||||||
*/
|
*/
|
||||||
|
/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are
|
||||||
/* This module requires POSIX 1003.1 functions. */
|
* called.
|
||||||
|
*/
|
||||||
#define _POSIX_SOURCE 1
|
#define _POSIX_SOURCE 1
|
||||||
|
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
|
|
||||||
#if PNG_ARM_NEON_OPT > 0
|
#if PNG_ARM_NEON_OPT > 0
|
||||||
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
|
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
|
||||||
/* WARNING: it is strongly recommended that you do not build libpng with
|
|
||||||
* run-time checks for CPU features if at all possible. In the case of the ARM
|
|
||||||
* NEON instructions there is no processor-specific way of detecting the
|
|
||||||
* presence of the required support, therefore run-time detection is extremely
|
|
||||||
* OS specific.
|
|
||||||
*
|
|
||||||
* You may set the macro PNG_ARM_NEON_FILE to the file name of file containing
|
|
||||||
* a fragment of C source code which defines the png_have_neon function. There
|
|
||||||
* are a number of implementations in contrib/arm-neon, but the only one that
|
|
||||||
* has partial support is contrib/arm-neon/linux.c - a generic Linux
|
|
||||||
* implementation which reads /proc/cpufino.
|
|
||||||
*/
|
|
||||||
#include <signal.h> /* for sig_atomic_t */
|
#include <signal.h> /* for sig_atomic_t */
|
||||||
|
|
||||||
#ifndef PNG_ARM_NEON_FILE
|
#ifdef __ANDROID__
|
||||||
# if defined(__aarch64__) || defined(_M_ARM64)
|
/* Linux provides access to information about CPU capabilites via
|
||||||
/* ARM Neon is expected to be unconditionally available on ARM64. */
|
* /proc/self/auxv, however Android blocks this while still claiming to be
|
||||||
# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on ARM64
|
* Linux. The Andoid NDK, however, provides appropriate support.
|
||||||
# elif defined(__ARM_NEON__) || defined(__ARM_NEON)
|
*
|
||||||
/* ARM Neon is expected to be available on the target CPU architecture. */
|
* Documentation: http://www.kandroid.org/ndk/docs/CPU-ARM-NEON.html
|
||||||
# error PNG_ARM_NEON_CHECK_SUPPORTED must not be defined on this CPU arch
|
*/
|
||||||
# elif defined(__linux__)
|
#include <cpu-features.h>
|
||||||
# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c"
|
|
||||||
# else
|
|
||||||
# error No support for run-time ARM Neon checking; use compile-time options
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int png_have_neon(png_structp png_ptr);
|
static int
|
||||||
#ifdef PNG_ARM_NEON_FILE
|
png_have_neon(png_structp png_ptr)
|
||||||
# include PNG_ARM_NEON_FILE
|
{
|
||||||
#endif
|
/* This is a whole lot easier than the mess below, however it is probably
|
||||||
|
* implemented as below, therefore it is better to cache the result (these
|
||||||
|
* function calls may be slow!)
|
||||||
|
*/
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
|
return android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM &&
|
||||||
|
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
|
||||||
|
}
|
||||||
|
#elif defined(__linux__)
|
||||||
|
/* The generic __linux__ implementation requires reading /proc/self/auxv and
|
||||||
|
* looking at each element for one that records NEON capabilities.
|
||||||
|
*/
|
||||||
|
#include <unistd.h> /* for POSIX 1003.1 */
|
||||||
|
#include <errno.h> /* for EINTR */
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <elf.h>
|
||||||
|
#include <asm/hwcap.h>
|
||||||
|
|
||||||
|
/* A read call may be interrupted, in which case it returns -1 and sets errno to
|
||||||
|
* EINTR if nothing was done, otherwise (if something was done) a partial read
|
||||||
|
* may result.
|
||||||
|
*/
|
||||||
|
static size_t
|
||||||
|
safe_read(png_structp png_ptr, int fd, void *buffer_in, size_t nbytes)
|
||||||
|
{
|
||||||
|
size_t ntotal = 0;
|
||||||
|
char *buffer = png_voidcast(char*, buffer_in);
|
||||||
|
|
||||||
|
while (nbytes > 0)
|
||||||
|
{
|
||||||
|
unsigned int nread;
|
||||||
|
int iread;
|
||||||
|
|
||||||
|
/* Passing nread > INT_MAX to read is implementation defined in POSIX
|
||||||
|
* 1003.1, therefore despite the unsigned argument portable code must
|
||||||
|
* limit the value to INT_MAX!
|
||||||
|
*/
|
||||||
|
if (nbytes > INT_MAX)
|
||||||
|
nread = INT_MAX;
|
||||||
|
|
||||||
|
else
|
||||||
|
nread = (unsigned int)/*SAFE*/nbytes;
|
||||||
|
|
||||||
|
iread = read(fd, buffer, nread);
|
||||||
|
|
||||||
|
if (iread == -1)
|
||||||
|
{
|
||||||
|
/* This is the devil in the details, a read can terminate early with 0
|
||||||
|
* bytes read because of EINTR, yet it still returns -1 otherwise end
|
||||||
|
* of file cannot be distinguished.
|
||||||
|
*/
|
||||||
|
if (errno != EINTR)
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "/proc read failed");
|
||||||
|
return 0; /* I.e., a permanent failure */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (iread < 0)
|
||||||
|
{
|
||||||
|
/* Not a valid 'read' result: */
|
||||||
|
png_warning(png_ptr, "OS /proc read bug");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (iread > 0)
|
||||||
|
{
|
||||||
|
/* Continue reading until a permanent failure, or EOF */
|
||||||
|
buffer += iread;
|
||||||
|
nbytes -= (unsigned int)/*SAFE*/iread;
|
||||||
|
ntotal += (unsigned int)/*SAFE*/iread;
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
return ntotal;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ntotal; /* nbytes == 0 */
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
png_have_neon(png_structp png_ptr)
|
||||||
|
{
|
||||||
|
int fd = open("/proc/self/auxv", O_RDONLY);
|
||||||
|
Elf32_auxv_t aux;
|
||||||
|
|
||||||
|
/* Failsafe: failure to open means no NEON */
|
||||||
|
if (fd == -1)
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "/proc/self/auxv open failed");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (safe_read(png_ptr, fd, &aux, sizeof aux) == sizeof aux)
|
||||||
|
{
|
||||||
|
if (aux.a_type == AT_HWCAP && (aux.a_un.a_val & HWCAP_NEON) != 0)
|
||||||
|
{
|
||||||
|
close(fd);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* We don't know how to do a run-time check on this system */
|
||||||
|
# error "no support for run-time ARM NEON checks"
|
||||||
|
#endif /* OS checks */
|
||||||
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
||||||
|
|
||||||
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
#ifndef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
# error ALIGNED_MEMORY is required; please define PNG_ALIGNED_MEMORY_SUPPORTED
|
# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -69,7 +164,6 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
|||||||
* wrong order of the 'ON' and 'default' cases. UNSET now defaults to OFF,
|
* wrong order of the 'ON' and 'default' cases. UNSET now defaults to OFF,
|
||||||
* as documented in png.h
|
* as documented in png.h
|
||||||
*/
|
*/
|
||||||
png_debug(1, "in png_init_filter_functions_neon");
|
|
||||||
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
||||||
switch ((pp->options >> PNG_ARM_NEON) & 3)
|
switch ((pp->options >> PNG_ARM_NEON) & 3)
|
||||||
{
|
{
|
||||||
@ -135,4 +229,4 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
#endif /* READ */
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
@ -1,60 +1,235 @@
|
|||||||
/* filter_neon.S - placeholder file
|
|
||||||
|
/* filter_neon.S - NEON optimised filter functions
|
||||||
*
|
*
|
||||||
* Copyright (c) 2024 Cosmin Truta
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
|
* Written by Mans Rullgard, 2011.
|
||||||
|
* Last changed in libpng 1.5.17 [June 27, 2013]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
* and license in png.h
|
* and license in png.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* IMPORTANT NOTE:
|
/* This is required to get the symbol renames, which are #defines, and also
|
||||||
*
|
* includes the definition (or not) of PNG_ARM_NEON_OPT.
|
||||||
* 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
|
#define PNG_VERSION_INFO_ONLY
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
#if defined(__linux__) && defined(__ELF__)
|
||||||
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
|
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||||
|
#endif
|
||||||
|
|
||||||
#if PNG_ARM_NEON_OPT > 0
|
#if PNG_ARM_NEON_OPT > 0
|
||||||
|
|
||||||
#if defined(__clang__)
|
#ifdef __ELF__
|
||||||
#define GNUC_VERSION 0 /* not gcc, although it might pretend to be */
|
# define ELF
|
||||||
#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
|
#else
|
||||||
#define GNUC_VERSION 0 /* not gcc */
|
# define ELF @
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (GNUC_VERSION > 0) && (GNUC_VERSION < 40300)
|
.arch armv7-a
|
||||||
#error "PNG_ARM_NEON is not supported with gcc versions earlier than 4.3.0"
|
.fpu neon
|
||||||
#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
|
||||||
|
.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_OPT > 0 */
|
||||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 */
|
|
||||||
#endif /* READ */
|
|
||||||
|
@ -1,401 +0,0 @@
|
|||||||
/* filter_neon_intrinsics.c - NEON optimised filter functions
|
|
||||||
*
|
|
||||||
* Copyright (c) 2018 Cosmin Truta
|
|
||||||
* Copyright (c) 2014,2016 Glenn Randers-Pehrson
|
|
||||||
* Written by James Yu <james.yu at linaro.org>, October 2013.
|
|
||||||
* Based on filter_neon.S, written by Mans Rullgard, 2011.
|
|
||||||
*
|
|
||||||
* This code is released under the libpng license.
|
|
||||||
* For conditions of distribution and use, see the disclaimer
|
|
||||||
* and license in png.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../pngpriv.h"
|
|
||||||
|
|
||||||
#ifdef PNG_READ_SUPPORTED
|
|
||||||
|
|
||||||
/* This code requires -mfpu=neon on the command line: */
|
|
||||||
#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
|
||||||
# include <arm64_neon.h>
|
|
||||||
#else
|
|
||||||
# include <arm_neon.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* libpng row pointers are not necessarily aligned to any particular boundary,
|
|
||||||
* however this code will only work with appropriate alignment. arm/arm_init.c
|
|
||||||
* checks for this (and will not compile unless it is done). This code uses
|
|
||||||
* variants of png_aligncast to avoid compiler warnings.
|
|
||||||
*/
|
|
||||||
#define png_ptr(type,pointer) png_aligncast(type *,pointer)
|
|
||||||
#define png_ptrc(type,pointer) png_aligncastconst(const type *,pointer)
|
|
||||||
|
|
||||||
/* The following relies on a variable 'temp_pointer' being declared with type
|
|
||||||
* 'type'. This is written this way just to hide the GCC strict aliasing
|
|
||||||
* warning; note that the code is safe because there never is an alias between
|
|
||||||
* the input and output pointers.
|
|
||||||
*
|
|
||||||
* When compiling with MSVC ARM64, the png_ldr macro can't be passed directly
|
|
||||||
* to vst4_lane_u32, because of an internal compiler error inside MSVC.
|
|
||||||
* To avoid this compiler bug, we use a temporary variable (vdest_val) to store
|
|
||||||
* the result of png_ldr.
|
|
||||||
*/
|
|
||||||
#define png_ldr(type,pointer)\
|
|
||||||
(temp_pointer = png_ptr(type,pointer), *temp_pointer)
|
|
||||||
|
|
||||||
#if PNG_ARM_NEON_OPT > 0
|
|
||||||
|
|
||||||
void
|
|
||||||
png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row)
|
|
||||||
{
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_bytep rp_stop = row + row_info->rowbytes;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
|
|
||||||
png_debug(1, "in png_read_filter_row_up_neon");
|
|
||||||
|
|
||||||
for (; rp < rp_stop; rp += 16, pp += 16)
|
|
||||||
{
|
|
||||||
uint8x16_t qrp, qpp;
|
|
||||||
|
|
||||||
qrp = vld1q_u8(rp);
|
|
||||||
qpp = vld1q_u8(pp);
|
|
||||||
qrp = vaddq_u8(qrp, qpp);
|
|
||||||
vst1q_u8(rp, qrp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
png_read_filter_row_sub3_neon(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row)
|
|
||||||
{
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_bytep rp_stop = row + row_info->rowbytes;
|
|
||||||
|
|
||||||
uint8x16_t vtmp = vld1q_u8(rp);
|
|
||||||
uint8x8x2_t *vrpt = png_ptr(uint8x8x2_t, &vtmp);
|
|
||||||
uint8x8x2_t vrp = *vrpt;
|
|
||||||
|
|
||||||
uint8x8x4_t vdest;
|
|
||||||
vdest.val[3] = vdup_n_u8(0);
|
|
||||||
|
|
||||||
png_debug(1, "in png_read_filter_row_sub3_neon");
|
|
||||||
|
|
||||||
for (; rp < rp_stop;)
|
|
||||||
{
|
|
||||||
uint8x8_t vtmp1, vtmp2;
|
|
||||||
uint32x2_t *temp_pointer;
|
|
||||||
|
|
||||||
vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3);
|
|
||||||
vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]);
|
|
||||||
vtmp2 = vext_u8(vrp.val[0], vrp.val[1], 6);
|
|
||||||
vdest.val[1] = vadd_u8(vdest.val[0], vtmp1);
|
|
||||||
|
|
||||||
vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1);
|
|
||||||
vdest.val[2] = vadd_u8(vdest.val[1], vtmp2);
|
|
||||||
vdest.val[3] = vadd_u8(vdest.val[2], vtmp1);
|
|
||||||
|
|
||||||
vtmp = vld1q_u8(rp + 12);
|
|
||||||
vrpt = png_ptr(uint8x8x2_t, &vtmp);
|
|
||||||
vrp = *vrpt;
|
|
||||||
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0);
|
|
||||||
rp += 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
PNG_UNUSED(prev_row)
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row)
|
|
||||||
{
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_bytep rp_stop = row + row_info->rowbytes;
|
|
||||||
|
|
||||||
uint8x8x4_t vdest;
|
|
||||||
vdest.val[3] = vdup_n_u8(0);
|
|
||||||
|
|
||||||
png_debug(1, "in png_read_filter_row_sub4_neon");
|
|
||||||
|
|
||||||
for (; rp < rp_stop; rp += 16)
|
|
||||||
{
|
|
||||||
uint32x2x4_t vtmp = vld4_u32(png_ptr(uint32_t,rp));
|
|
||||||
uint8x8x4_t *vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
|
||||||
uint8x8x4_t vrp = *vrpt;
|
|
||||||
uint32x2x4_t *temp_pointer;
|
|
||||||
uint32x2x4_t vdest_val;
|
|
||||||
|
|
||||||
vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]);
|
|
||||||
vdest.val[1] = vadd_u8(vdest.val[0], vrp.val[1]);
|
|
||||||
vdest.val[2] = vadd_u8(vdest.val[1], vrp.val[2]);
|
|
||||||
vdest.val[3] = vadd_u8(vdest.val[2], vrp.val[3]);
|
|
||||||
|
|
||||||
vdest_val = png_ldr(uint32x2x4_t, &vdest);
|
|
||||||
vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
PNG_UNUSED(prev_row)
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
png_read_filter_row_avg3_neon(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row)
|
|
||||||
{
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
png_bytep rp_stop = row + row_info->rowbytes;
|
|
||||||
|
|
||||||
uint8x16_t vtmp;
|
|
||||||
uint8x8x2_t *vrpt;
|
|
||||||
uint8x8x2_t vrp;
|
|
||||||
uint8x8x4_t vdest;
|
|
||||||
vdest.val[3] = vdup_n_u8(0);
|
|
||||||
|
|
||||||
vtmp = vld1q_u8(rp);
|
|
||||||
vrpt = png_ptr(uint8x8x2_t,&vtmp);
|
|
||||||
vrp = *vrpt;
|
|
||||||
|
|
||||||
png_debug(1, "in png_read_filter_row_avg3_neon");
|
|
||||||
|
|
||||||
for (; rp < rp_stop; pp += 12)
|
|
||||||
{
|
|
||||||
uint8x8_t vtmp1, vtmp2, vtmp3;
|
|
||||||
|
|
||||||
uint8x8x2_t *vppt;
|
|
||||||
uint8x8x2_t vpp;
|
|
||||||
|
|
||||||
uint32x2_t *temp_pointer;
|
|
||||||
|
|
||||||
vtmp = vld1q_u8(pp);
|
|
||||||
vppt = png_ptr(uint8x8x2_t,&vtmp);
|
|
||||||
vpp = *vppt;
|
|
||||||
|
|
||||||
vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3);
|
|
||||||
vdest.val[0] = vhadd_u8(vdest.val[3], vpp.val[0]);
|
|
||||||
vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]);
|
|
||||||
|
|
||||||
vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 3);
|
|
||||||
vtmp3 = vext_u8(vrp.val[0], vrp.val[1], 6);
|
|
||||||
vdest.val[1] = vhadd_u8(vdest.val[0], vtmp2);
|
|
||||||
vdest.val[1] = vadd_u8(vdest.val[1], vtmp1);
|
|
||||||
|
|
||||||
vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 6);
|
|
||||||
vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1);
|
|
||||||
|
|
||||||
vtmp = vld1q_u8(rp + 12);
|
|
||||||
vrpt = png_ptr(uint8x8x2_t,&vtmp);
|
|
||||||
vrp = *vrpt;
|
|
||||||
|
|
||||||
vdest.val[2] = vhadd_u8(vdest.val[1], vtmp2);
|
|
||||||
vdest.val[2] = vadd_u8(vdest.val[2], vtmp3);
|
|
||||||
|
|
||||||
vtmp2 = vext_u8(vpp.val[1], vpp.val[1], 1);
|
|
||||||
|
|
||||||
vdest.val[3] = vhadd_u8(vdest.val[2], vtmp2);
|
|
||||||
vdest.val[3] = vadd_u8(vdest.val[3], vtmp1);
|
|
||||||
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0);
|
|
||||||
rp += 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row)
|
|
||||||
{
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_bytep rp_stop = row + row_info->rowbytes;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
|
|
||||||
uint8x8x4_t vdest;
|
|
||||||
vdest.val[3] = vdup_n_u8(0);
|
|
||||||
|
|
||||||
png_debug(1, "in png_read_filter_row_avg4_neon");
|
|
||||||
|
|
||||||
for (; rp < rp_stop; rp += 16, pp += 16)
|
|
||||||
{
|
|
||||||
uint32x2x4_t vtmp;
|
|
||||||
uint8x8x4_t *vrpt, *vppt;
|
|
||||||
uint8x8x4_t vrp, vpp;
|
|
||||||
uint32x2x4_t *temp_pointer;
|
|
||||||
uint32x2x4_t vdest_val;
|
|
||||||
|
|
||||||
vtmp = vld4_u32(png_ptr(uint32_t,rp));
|
|
||||||
vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
|
||||||
vrp = *vrpt;
|
|
||||||
vtmp = vld4_u32(png_ptrc(uint32_t,pp));
|
|
||||||
vppt = png_ptr(uint8x8x4_t,&vtmp);
|
|
||||||
vpp = *vppt;
|
|
||||||
|
|
||||||
vdest.val[0] = vhadd_u8(vdest.val[3], vpp.val[0]);
|
|
||||||
vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]);
|
|
||||||
vdest.val[1] = vhadd_u8(vdest.val[0], vpp.val[1]);
|
|
||||||
vdest.val[1] = vadd_u8(vdest.val[1], vrp.val[1]);
|
|
||||||
vdest.val[2] = vhadd_u8(vdest.val[1], vpp.val[2]);
|
|
||||||
vdest.val[2] = vadd_u8(vdest.val[2], vrp.val[2]);
|
|
||||||
vdest.val[3] = vhadd_u8(vdest.val[2], vpp.val[3]);
|
|
||||||
vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]);
|
|
||||||
|
|
||||||
vdest_val = png_ldr(uint32x2x4_t, &vdest);
|
|
||||||
vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint8x8_t
|
|
||||||
paeth(uint8x8_t a, uint8x8_t b, uint8x8_t c)
|
|
||||||
{
|
|
||||||
uint8x8_t d, e;
|
|
||||||
uint16x8_t p1, pa, pb, pc;
|
|
||||||
|
|
||||||
p1 = vaddl_u8(a, b); /* a + b */
|
|
||||||
pc = vaddl_u8(c, c); /* c * 2 */
|
|
||||||
pa = vabdl_u8(b, c); /* pa */
|
|
||||||
pb = vabdl_u8(a, c); /* pb */
|
|
||||||
pc = vabdq_u16(p1, pc); /* pc */
|
|
||||||
|
|
||||||
p1 = vcleq_u16(pa, pb); /* pa <= pb */
|
|
||||||
pa = vcleq_u16(pa, pc); /* pa <= pc */
|
|
||||||
pb = vcleq_u16(pb, pc); /* pb <= pc */
|
|
||||||
|
|
||||||
p1 = vandq_u16(p1, pa); /* pa <= pb && pa <= pc */
|
|
||||||
|
|
||||||
d = vmovn_u16(pb);
|
|
||||||
e = vmovn_u16(p1);
|
|
||||||
|
|
||||||
d = vbsl_u8(d, b, c);
|
|
||||||
e = vbsl_u8(e, a, d);
|
|
||||||
|
|
||||||
return e;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
png_read_filter_row_paeth3_neon(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row)
|
|
||||||
{
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
png_bytep rp_stop = row + row_info->rowbytes;
|
|
||||||
|
|
||||||
uint8x16_t vtmp;
|
|
||||||
uint8x8x2_t *vrpt;
|
|
||||||
uint8x8x2_t vrp;
|
|
||||||
uint8x8_t vlast = vdup_n_u8(0);
|
|
||||||
uint8x8x4_t vdest;
|
|
||||||
vdest.val[3] = vdup_n_u8(0);
|
|
||||||
|
|
||||||
vtmp = vld1q_u8(rp);
|
|
||||||
vrpt = png_ptr(uint8x8x2_t,&vtmp);
|
|
||||||
vrp = *vrpt;
|
|
||||||
|
|
||||||
png_debug(1, "in png_read_filter_row_paeth3_neon");
|
|
||||||
|
|
||||||
for (; rp < rp_stop; pp += 12)
|
|
||||||
{
|
|
||||||
uint8x8x2_t *vppt;
|
|
||||||
uint8x8x2_t vpp;
|
|
||||||
uint8x8_t vtmp1, vtmp2, vtmp3;
|
|
||||||
uint32x2_t *temp_pointer;
|
|
||||||
|
|
||||||
vtmp = vld1q_u8(pp);
|
|
||||||
vppt = png_ptr(uint8x8x2_t,&vtmp);
|
|
||||||
vpp = *vppt;
|
|
||||||
|
|
||||||
vdest.val[0] = paeth(vdest.val[3], vpp.val[0], vlast);
|
|
||||||
vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]);
|
|
||||||
|
|
||||||
vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3);
|
|
||||||
vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 3);
|
|
||||||
vdest.val[1] = paeth(vdest.val[0], vtmp2, vpp.val[0]);
|
|
||||||
vdest.val[1] = vadd_u8(vdest.val[1], vtmp1);
|
|
||||||
|
|
||||||
vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 6);
|
|
||||||
vtmp3 = vext_u8(vpp.val[0], vpp.val[1], 6);
|
|
||||||
vdest.val[2] = paeth(vdest.val[1], vtmp3, vtmp2);
|
|
||||||
vdest.val[2] = vadd_u8(vdest.val[2], vtmp1);
|
|
||||||
|
|
||||||
vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1);
|
|
||||||
vtmp2 = vext_u8(vpp.val[1], vpp.val[1], 1);
|
|
||||||
|
|
||||||
vtmp = vld1q_u8(rp + 12);
|
|
||||||
vrpt = png_ptr(uint8x8x2_t,&vtmp);
|
|
||||||
vrp = *vrpt;
|
|
||||||
|
|
||||||
vdest.val[3] = paeth(vdest.val[2], vtmp2, vtmp3);
|
|
||||||
vdest.val[3] = vadd_u8(vdest.val[3], vtmp1);
|
|
||||||
|
|
||||||
vlast = vtmp2;
|
|
||||||
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0);
|
|
||||||
rp += 3;
|
|
||||||
vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0);
|
|
||||||
rp += 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row)
|
|
||||||
{
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_bytep rp_stop = row + row_info->rowbytes;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
|
|
||||||
uint8x8_t vlast = vdup_n_u8(0);
|
|
||||||
uint8x8x4_t vdest;
|
|
||||||
vdest.val[3] = vdup_n_u8(0);
|
|
||||||
|
|
||||||
png_debug(1, "in png_read_filter_row_paeth4_neon");
|
|
||||||
|
|
||||||
for (; rp < rp_stop; rp += 16, pp += 16)
|
|
||||||
{
|
|
||||||
uint32x2x4_t vtmp;
|
|
||||||
uint8x8x4_t *vrpt, *vppt;
|
|
||||||
uint8x8x4_t vrp, vpp;
|
|
||||||
uint32x2x4_t *temp_pointer;
|
|
||||||
uint32x2x4_t vdest_val;
|
|
||||||
|
|
||||||
vtmp = vld4_u32(png_ptr(uint32_t,rp));
|
|
||||||
vrpt = png_ptr(uint8x8x4_t,&vtmp);
|
|
||||||
vrp = *vrpt;
|
|
||||||
vtmp = vld4_u32(png_ptrc(uint32_t,pp));
|
|
||||||
vppt = png_ptr(uint8x8x4_t,&vtmp);
|
|
||||||
vpp = *vppt;
|
|
||||||
|
|
||||||
vdest.val[0] = paeth(vdest.val[3], vpp.val[0], vlast);
|
|
||||||
vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]);
|
|
||||||
vdest.val[1] = paeth(vdest.val[0], vpp.val[1], vpp.val[0]);
|
|
||||||
vdest.val[1] = vadd_u8(vdest.val[1], vrp.val[1]);
|
|
||||||
vdest.val[2] = paeth(vdest.val[1], vpp.val[2], vpp.val[1]);
|
|
||||||
vdest.val[2] = vadd_u8(vdest.val[2], vrp.val[2]);
|
|
||||||
vdest.val[3] = paeth(vdest.val[2], vpp.val[3], vpp.val[2]);
|
|
||||||
vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]);
|
|
||||||
|
|
||||||
vlast = vpp.val[3];
|
|
||||||
|
|
||||||
vdest_val = png_ldr(uint32x2x4_t, &vdest);
|
|
||||||
vst4_lane_u32(png_ptr(uint32_t,rp), vdest_val, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
|
||||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 1 (intrinsics) */
|
|
||||||
#endif /* READ */
|
|
@ -1,150 +0,0 @@
|
|||||||
/* palette_neon_intrinsics.c - NEON optimised palette expansion functions
|
|
||||||
*
|
|
||||||
* Copyright (c) 2018-2019 Cosmin Truta
|
|
||||||
* Copyright (c) 2017-2018 Arm Holdings. All rights reserved.
|
|
||||||
* Written by Richard Townsend <Richard.Townsend@arm.com>, February 2017.
|
|
||||||
*
|
|
||||||
* This code is released under the libpng license.
|
|
||||||
* For conditions of distribution and use, see the disclaimer
|
|
||||||
* and license in png.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "../pngpriv.h"
|
|
||||||
|
|
||||||
#if PNG_ARM_NEON_IMPLEMENTATION == 1
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64)
|
|
||||||
# include <arm64_neon.h>
|
|
||||||
#else
|
|
||||||
# include <arm_neon.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Build an RGBA8 palette from the separate RGB and alpha palettes. */
|
|
||||||
void
|
|
||||||
png_riffle_palette_neon(png_structrp png_ptr)
|
|
||||||
{
|
|
||||||
png_const_colorp palette = png_ptr->palette;
|
|
||||||
png_bytep riffled_palette = png_ptr->riffled_palette;
|
|
||||||
png_const_bytep trans_alpha = png_ptr->trans_alpha;
|
|
||||||
int num_trans = png_ptr->num_trans;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* Initially black, opaque. */
|
|
||||||
uint8x16x4_t w = {{
|
|
||||||
vdupq_n_u8(0x00),
|
|
||||||
vdupq_n_u8(0x00),
|
|
||||||
vdupq_n_u8(0x00),
|
|
||||||
vdupq_n_u8(0xff),
|
|
||||||
}};
|
|
||||||
|
|
||||||
png_debug(1, "in png_riffle_palette_neon");
|
|
||||||
|
|
||||||
/* First, riffle the RGB colours into an RGBA8 palette.
|
|
||||||
* The alpha component is set to opaque for now.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < 256; i += 16)
|
|
||||||
{
|
|
||||||
uint8x16x3_t v = vld3q_u8((png_const_bytep)(palette + i));
|
|
||||||
w.val[0] = v.val[0];
|
|
||||||
w.val[1] = v.val[1];
|
|
||||||
w.val[2] = v.val[2];
|
|
||||||
vst4q_u8(riffled_palette + (i << 2), w);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fix up the missing transparency values. */
|
|
||||||
for (i = 0; i < num_trans; i++)
|
|
||||||
riffled_palette[(i << 2) + 3] = trans_alpha[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Expands a palettized row into RGBA8. */
|
|
||||||
int
|
|
||||||
png_do_expand_palette_rgba8_neon(png_structrp png_ptr, png_row_infop row_info,
|
|
||||||
png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
|
|
||||||
{
|
|
||||||
png_uint_32 row_width = row_info->width;
|
|
||||||
const png_uint_32 *riffled_palette =
|
|
||||||
png_aligncastconst(png_const_uint_32p, png_ptr->riffled_palette);
|
|
||||||
const png_uint_32 pixels_per_chunk = 4;
|
|
||||||
png_uint_32 i;
|
|
||||||
|
|
||||||
png_debug(1, "in png_do_expand_palette_rgba8_neon");
|
|
||||||
|
|
||||||
PNG_UNUSED(row)
|
|
||||||
if (row_width < pixels_per_chunk)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* This function originally gets the last byte of the output row.
|
|
||||||
* The NEON part writes forward from a given position, so we have
|
|
||||||
* to seek this back by 4 pixels x 4 bytes.
|
|
||||||
*/
|
|
||||||
*ddp = *ddp - ((pixels_per_chunk * sizeof(png_uint_32)) - 1);
|
|
||||||
|
|
||||||
for (i = 0; i < row_width; i += pixels_per_chunk)
|
|
||||||
{
|
|
||||||
uint32x4_t cur;
|
|
||||||
png_bytep sp = *ssp - i, dp = *ddp - (i << 2);
|
|
||||||
cur = vld1q_dup_u32 (riffled_palette + *(sp - 3));
|
|
||||||
cur = vld1q_lane_u32(riffled_palette + *(sp - 2), cur, 1);
|
|
||||||
cur = vld1q_lane_u32(riffled_palette + *(sp - 1), cur, 2);
|
|
||||||
cur = vld1q_lane_u32(riffled_palette + *(sp - 0), cur, 3);
|
|
||||||
vst1q_u32((void *)dp, cur);
|
|
||||||
}
|
|
||||||
if (i != row_width)
|
|
||||||
{
|
|
||||||
/* Remove the amount that wasn't processed. */
|
|
||||||
i -= pixels_per_chunk;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Decrement output pointers. */
|
|
||||||
*ssp = *ssp - i;
|
|
||||||
*ddp = *ddp - (i << 2);
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Expands a palettized row into RGB8. */
|
|
||||||
int
|
|
||||||
png_do_expand_palette_rgb8_neon(png_structrp png_ptr, png_row_infop row_info,
|
|
||||||
png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
|
|
||||||
{
|
|
||||||
png_uint_32 row_width = row_info->width;
|
|
||||||
png_const_bytep palette = (png_const_bytep)png_ptr->palette;
|
|
||||||
const png_uint_32 pixels_per_chunk = 8;
|
|
||||||
png_uint_32 i;
|
|
||||||
|
|
||||||
png_debug(1, "in png_do_expand_palette_rgb8_neon");
|
|
||||||
|
|
||||||
PNG_UNUSED(row)
|
|
||||||
if (row_width <= pixels_per_chunk)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* Seeking this back by 8 pixels x 3 bytes. */
|
|
||||||
*ddp = *ddp - ((pixels_per_chunk * sizeof(png_color)) - 1);
|
|
||||||
|
|
||||||
for (i = 0; i < row_width; i += pixels_per_chunk)
|
|
||||||
{
|
|
||||||
uint8x8x3_t cur;
|
|
||||||
png_bytep sp = *ssp - i, dp = *ddp - ((i << 1) + i);
|
|
||||||
cur = vld3_dup_u8(palette + sizeof(png_color) * (*(sp - 7)));
|
|
||||||
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 6)), cur, 1);
|
|
||||||
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 5)), cur, 2);
|
|
||||||
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 4)), cur, 3);
|
|
||||||
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 3)), cur, 4);
|
|
||||||
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 2)), cur, 5);
|
|
||||||
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 1)), cur, 6);
|
|
||||||
cur = vld3_lane_u8(palette + sizeof(png_color) * (*(sp - 0)), cur, 7);
|
|
||||||
vst3_u8((void *)dp, cur);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i != row_width)
|
|
||||||
{
|
|
||||||
/* Remove the amount that wasn't processed. */
|
|
||||||
i -= pixels_per_chunk;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Decrement output pointers. */
|
|
||||||
*ssp = *ssp - i;
|
|
||||||
*ddp = *ddp - ((i << 1) + i);
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION */
|
|
252
autogen.sh
252
autogen.sh
@ -1,226 +1,34 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
# a quick hack script to generate necessary files from
|
||||||
|
# auto* tools.
|
||||||
#
|
#
|
||||||
# Run 'autoreconf' to build 'configure', 'Makefile.in' and other configure
|
# WARNING: if you run this you will change the versions
|
||||||
# control files.
|
# of the tools which are used and, maybe, required!
|
||||||
#
|
|
||||||
# The first time this is run on a GIT checkout the only files that exist are
|
|
||||||
# configure.ac and Makefile.am; all of the autotools support scripts are
|
|
||||||
# missing. They are instantiated with autoreconf --force --install.
|
|
||||||
#
|
|
||||||
# For regular ("tarball") distributions all the files should exist. We do not
|
|
||||||
# want them to be updated *under any circumstances*. It should never be
|
|
||||||
# necessary to run autogen.sh because ./configure --enable-maintainer-mode says
|
|
||||||
# what to do if Makefile.am or configure.ac are changed.
|
|
||||||
#
|
|
||||||
# It is *probably* OK to update the files on a GIT checkout, because they have
|
|
||||||
# come from the local tools, but leave that to the user who is assumed to know
|
|
||||||
# whether it is ok or required.
|
|
||||||
#
|
|
||||||
# This script is intended to work without arguments, there are, however, hidden
|
|
||||||
# arguments (a) for use while testing the script and (b) to fix up systems that
|
|
||||||
# have been broken. If (b) is required the script prompts for the correct
|
|
||||||
# options. For this reason the options are *NOT* documented in the help; this
|
|
||||||
# is deliberate; UTSL.
|
|
||||||
#
|
|
||||||
clean=
|
|
||||||
maintainer=
|
|
||||||
while test $# -gt 0
|
|
||||||
do
|
|
||||||
case "$1" in
|
|
||||||
--maintainer)
|
|
||||||
maintainer=1;;
|
|
||||||
|
|
||||||
--clean)
|
# You can define your own replacements in your environment.
|
||||||
clean=1;;
|
# $AUTOCONF, $AUTOMAKE, $AUTOHEADER, $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE
|
||||||
|
|
||||||
*)
|
touch Makefile.am configure.ac
|
||||||
exec >&2
|
{
|
||||||
echo "$0: usage: ./autogen.sh"
|
LT=${LIBTOOLIZE-libtoolize}
|
||||||
if test -d .git
|
echo "running $LT" >&2
|
||||||
then
|
$LT --force --copy --automake
|
||||||
echo " ./autogen.sh generates the configure script and"
|
} && {
|
||||||
echo " Makefile.in, or refreshes them after changes to Makefile.am"
|
AL=${ACLOCAL-aclocal}
|
||||||
echo " or configure.ac. You may prefer to just run autoreconf."
|
echo "running $AL" >&2
|
||||||
elif test -z "$maintainer"
|
$AL
|
||||||
then
|
} && {
|
||||||
echo " DO NOT RUN THIS SCRIPT."
|
AH=${AUTOHEADER-autoheader}
|
||||||
echo " If you need to change Makefile.am or configure.ac then you"
|
echo "running $AH [ignore the warnings]" >&2
|
||||||
echo " also need to run ./configure --enable-maintainer-mode and"
|
$AH
|
||||||
echo " use the appropriate autotools, *NOT* this script, to update"
|
} && {
|
||||||
echo " everything, please check the documentation of autoreconf."
|
AM=${AUTOMAKE-automake}
|
||||||
echo " WARNING: libpng is intentionally generated with a known,"
|
echo "running $AM" >&2
|
||||||
echo " fixed, set of autotools. It is known *NOT* to work with"
|
$AM --force-missing --foreign -a -c
|
||||||
echo " the collection of autotools distributed on highly reputable"
|
} && {
|
||||||
echo " operating systems."
|
AC=${AUTOCONF-autoconf}
|
||||||
echo " Remember: autotools is GNU software, you are expected to"
|
echo "running $AC" >&2
|
||||||
echo " pay for support."
|
$AC
|
||||||
else
|
} &&
|
||||||
echo " You have run autogen.sh with --maintainer enabled and you"
|
echo "autogen complete" >&2 ||
|
||||||
echo " are not using a GIT distribution, then you have given an"
|
echo "ERROR: autogen.sh failed, autogen is incomplete" >&2
|
||||||
echo " unrecognized argument. This is not good. --maintainer"
|
|
||||||
echo " switches off any assumptions that you might not know what"
|
|
||||||
echo " you are doing."
|
|
||||||
fi
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
#
|
|
||||||
# First check for a set of the autotools files; if absent then this is assumed
|
|
||||||
# to be a GIT version and the local autotools must be used. If present this
|
|
||||||
# is a tarball distribution and the script should not be used. If partially
|
|
||||||
# present bad things are happening.
|
|
||||||
#
|
|
||||||
# The autotools generated files:
|
|
||||||
libpng_autotools_files="Makefile.in aclocal.m4 config.guess config.h.in
|
|
||||||
config.sub configure depcomp install-sh ltmain.sh missing\
|
|
||||||
test-driver"
|
|
||||||
#
|
|
||||||
# Files generated by versions of autoconf >2.68 or automake >1.13 (i.e. later
|
|
||||||
# versions than those required by configure.ac):
|
|
||||||
libpng_autotools_extra="compile config.h.in~"
|
|
||||||
#
|
|
||||||
# These are separate because 'maintainer-clean' does not remove them.
|
|
||||||
libpng_libtool_files="scripts/autoconf/libtool.m4 scripts/autoconf/ltoptions.m4\
|
|
||||||
scripts/autoconf/ltsugar.m4 scripts/autoconf/ltversion.m4\
|
|
||||||
scripts/autoconf/lt~obsolete.m4"
|
|
||||||
|
|
||||||
libpng_autotools_dirs="autom4te.cache" # not required
|
|
||||||
#
|
|
||||||
# The configure generated files:
|
|
||||||
libpng_configure_files="Makefile config.h config.log config.status\
|
|
||||||
libpng-config libpng.pc libtool stamp-h1"
|
|
||||||
|
|
||||||
libpng_configure_dirs=".deps"
|
|
||||||
#
|
|
||||||
# We must remove the configure generated files as well as the autotools
|
|
||||||
# generated files if autotools are regenerated because otherwise if configure
|
|
||||||
# has been run without "--enable-maintainer-mode" make can do a partial update
|
|
||||||
# of Makefile. These functions do the two bits of cleaning.
|
|
||||||
clean_autotools(){
|
|
||||||
rm -rf $libpng_autotools_files $libpng_libtool_files $libpng_autotools_dirs
|
|
||||||
rm -rf $libpng_autotools_extra
|
|
||||||
}
|
|
||||||
|
|
||||||
clean_configure(){
|
|
||||||
rm -rf $libpng_configure_files $libpng_configure_dirs
|
|
||||||
}
|
|
||||||
#
|
|
||||||
# Clean: remove everything (this is to help with testing)
|
|
||||||
if test -n "$clean"
|
|
||||||
then
|
|
||||||
clean_configure
|
|
||||||
if test -n "$maintainer"
|
|
||||||
then
|
|
||||||
clean_autotools
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# Validate the distribution.
|
|
||||||
libpng_autotools_file_found=
|
|
||||||
libpng_autotools_file_missing=
|
|
||||||
for file in $libpng_autotools_files
|
|
||||||
do
|
|
||||||
if test -f "$file"
|
|
||||||
then
|
|
||||||
libpng_autotools_file_found=1
|
|
||||||
else
|
|
||||||
libpng_autotools_file_missing=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
#
|
|
||||||
# Presence of one of these does not *invalidate* missing, but absence
|
|
||||||
# invalidates found.
|
|
||||||
for file in $libpng_libtool_files
|
|
||||||
do
|
|
||||||
if test ! -f "$file"
|
|
||||||
then
|
|
||||||
libpng_autotools_file_missing=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
#
|
|
||||||
# The cache directory doesn't matter - it will be regenerated and does not exist
|
|
||||||
# anyway in a tarball.
|
|
||||||
#
|
|
||||||
# Either everything is missing or everything is there, the --maintainer option
|
|
||||||
# just changes this so that the mode is set to generate all the files.
|
|
||||||
mode=
|
|
||||||
if test -z "$libpng_autotools_file_found" -o -n "$maintainer"
|
|
||||||
then
|
|
||||||
mode="autoreconf"
|
|
||||||
else
|
|
||||||
if test -n "$libpng_autotools_file_missing"
|
|
||||||
then
|
|
||||||
mode="broken"
|
|
||||||
else
|
|
||||||
mode="configure"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# So:
|
|
||||||
case "$mode" in
|
|
||||||
autoreconf)
|
|
||||||
# Clean in case configure files exist
|
|
||||||
clean_configure
|
|
||||||
clean_autotools
|
|
||||||
# Everything must be initialized, so use --force
|
|
||||||
if autoreconf --warnings=all --force --install
|
|
||||||
then
|
|
||||||
missing=
|
|
||||||
for file in $libpng_autotools_files
|
|
||||||
do
|
|
||||||
test -f "$file" || missing=1
|
|
||||||
done
|
|
||||||
# ignore the cache directory
|
|
||||||
test -z "$missing" || {
|
|
||||||
exec >&2
|
|
||||||
echo "autoreconf was run, but did not produce all the expected"
|
|
||||||
echo "files. It is likely that your autotools installation is"
|
|
||||||
echo "not compatible with that expected by libpng."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
else
|
|
||||||
exec >&2
|
|
||||||
echo "autoreconf failed: your version of autotools is incompatible"
|
|
||||||
echo "with this libpng version. Please use a distributed archive"
|
|
||||||
echo "(which includes the autotools generated files) and run configure"
|
|
||||||
echo "instead."
|
|
||||||
exit 1
|
|
||||||
fi;;
|
|
||||||
|
|
||||||
configure)
|
|
||||||
if test -d .git
|
|
||||||
then
|
|
||||||
exec >&2
|
|
||||||
echo "ERROR: running autoreconf on an initialized system"
|
|
||||||
echo " This is not necessary; it is only necessary to remake the"
|
|
||||||
echo " autotools generated files if Makefile.am or configure.ac"
|
|
||||||
echo " change and make does the right thing with:"
|
|
||||||
echo
|
|
||||||
echo " ./configure --enable-maintainer-mode."
|
|
||||||
echo
|
|
||||||
echo " You can run autoreconf yourself if you don't like maintainer"
|
|
||||||
echo " mode and you can also just run autoreconf -f -i to initialize"
|
|
||||||
echo " everything in the first place; this script is only for"
|
|
||||||
echo " compatibility with prior releases."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
exec >&2
|
|
||||||
echo "autogen.sh is intended only to generate 'configure' on systems"
|
|
||||||
echo "that do not have it. You have a complete 'configure', if you"
|
|
||||||
echo "need to change Makefile.am or configure.ac you also need to"
|
|
||||||
echo "run configure with the --enable-maintainer-mode option."
|
|
||||||
exit 1
|
|
||||||
fi;;
|
|
||||||
|
|
||||||
broken)
|
|
||||||
exec >&2
|
|
||||||
echo "Your system has a partial set of autotools generated files."
|
|
||||||
echo "autogen.sh is unable to proceed. The full set of files is"
|
|
||||||
echo "contained in the libpng 'tar' distribution archive and you do"
|
|
||||||
echo "not need to run autogen.sh if you use it."
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
# Disable the "expressions don't expand in single quotes, use double quotes"
|
|
||||||
# advice. We need the regular expressions to remain uninterpolated.
|
|
||||||
disable=SC2016
|
|
||||||
|
|
||||||
# Disable the "variable appears unused" warning caused by the use of getopts
|
|
||||||
# with an obligatory (but unused) variable name in the main function.
|
|
||||||
disable=SC2034
|
|
||||||
|
|
||||||
# Disable all the "quote to prevent globbing or word splitting" advice.
|
|
||||||
# We need word splitting for well-known variables like MAKEFLAGS and CFLAGS.
|
|
||||||
disable=SC2086,SC2206
|
|
@ -1,19 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
25
ci/README.md
25
ci/README.md
@ -1,25 +0,0 @@
|
|||||||
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
|
|
142
ci/ci_lint.sh
142
ci/ci_lint.sh
@ -1,142 +0,0 @@
|
|||||||
#!/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"
|
|
||||||
cd "$CI_TOPLEVEL_DIR"
|
|
||||||
|
|
||||||
# Initialize the global constants CI_{...}{CHECK,CHECKER,LINT}.
|
|
||||||
CI_SHELLCHECK="${CI_SHELLCHECK:-shellcheck}"
|
|
||||||
CI_EDITORCONFIG_CHECKER="${CI_EDITORCONFIG_CHECKER:-editorconfig-checker}"
|
|
||||||
CI_YAMLLINT="${CI_YAMLLINT:-yamllint}"
|
|
||||||
|
|
||||||
# Initialize the global lint status.
|
|
||||||
CI_LINT_STATUS=0
|
|
||||||
|
|
||||||
function ci_init_lint {
|
|
||||||
ci_info "## START OF LINTING ##"
|
|
||||||
local my_program
|
|
||||||
# Complete the initialization of CI_SHELLCHECK.
|
|
||||||
# Set it to the empty string if the shellcheck program is unavailable.
|
|
||||||
my_program="$(command -v "$CI_SHELLCHECK")" || {
|
|
||||||
ci_warn "program not found: '$CI_SHELLCHECK'"
|
|
||||||
}
|
|
||||||
CI_SHELLCHECK="$my_program"
|
|
||||||
# Complete the initialization of CI_EDITORCONFIG_CHECKER.
|
|
||||||
# Set it to the empty string if the editorconfig-checker program is unavailable.
|
|
||||||
my_program="$(command -v "$CI_EDITORCONFIG_CHECKER")" || {
|
|
||||||
ci_warn "program not found: '$CI_EDITORCONFIG_CHECKER'"
|
|
||||||
}
|
|
||||||
CI_EDITORCONFIG_CHECKER="$my_program"
|
|
||||||
# Complete the initialization of CI_YAMLLINT.
|
|
||||||
# Set it to the empty string if the yamllint program is unavailable.
|
|
||||||
my_program="$(command -v "$CI_YAMLLINT")" || {
|
|
||||||
ci_warn "program not found: '$CI_YAMLLINT'"
|
|
||||||
}
|
|
||||||
CI_YAMLLINT="$my_program"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_finish_lint {
|
|
||||||
ci_info "## END OF LINTING ##"
|
|
||||||
if [[ $CI_LINT_STATUS -eq 0 ]]
|
|
||||||
then
|
|
||||||
ci_info "## SUCCESS ##"
|
|
||||||
else
|
|
||||||
ci_info "linting failed"
|
|
||||||
fi
|
|
||||||
return "$CI_LINT_STATUS"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_lint_ci_scripts {
|
|
||||||
[[ -x $CI_SHELLCHECK ]] || {
|
|
||||||
ci_warn "## NOT LINTING: CI scripts ##"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
ci_info "## LINTING: CI scripts ##"
|
|
||||||
ci_spawn "$CI_SHELLCHECK" --version
|
|
||||||
find ./ci -name "ci_*.sh" -not -name "ci_env.*.sh" | {
|
|
||||||
local my_file
|
|
||||||
while IFS="" read -r my_file
|
|
||||||
do
|
|
||||||
ci_spawn "$CI_SHELLCHECK" -x "$my_file" || {
|
|
||||||
# Linting failed.
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_lint_text_files {
|
|
||||||
[[ -x $CI_EDITORCONFIG_CHECKER ]] || {
|
|
||||||
ci_warn "## NOT LINTING: text files ##"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
ci_info "## LINTING: text files ##"
|
|
||||||
ci_spawn "$CI_EDITORCONFIG_CHECKER" --version
|
|
||||||
ci_spawn "$CI_EDITORCONFIG_CHECKER" --config .editorconfig-checker.json || {
|
|
||||||
# Linting failed.
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_lint_yaml_files {
|
|
||||||
[[ -x $CI_YAMLLINT ]] || {
|
|
||||||
ci_warn "## NOT LINTING: YAML files ##"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
ci_info "## LINTING: YAML files ##"
|
|
||||||
ci_spawn "$CI_YAMLLINT" --version
|
|
||||||
# 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
|
|
||||||
ci_spawn "$CI_YAMLLINT" --strict "$my_file" || {
|
|
||||||
# Linting failed.
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_lint {
|
|
||||||
ci_init_lint
|
|
||||||
ci_lint_ci_scripts || CI_LINT_STATUS=1
|
|
||||||
ci_lint_text_files || CI_LINT_STATUS=1
|
|
||||||
ci_lint_yaml_files || CI_LINT_STATUS=1
|
|
||||||
# TODO: ci_lint_png_files, etc.
|
|
||||||
ci_finish_lint
|
|
||||||
}
|
|
||||||
|
|
||||||
function usage {
|
|
||||||
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
|
||||||
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 ]] || {
|
|
||||||
echo >&2 "error: unexpected argument: '$1'"
|
|
||||||
usage 2
|
|
||||||
}
|
|
||||||
# And... go!
|
|
||||||
ci_lint
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
@ -1,209 +0,0 @@
|
|||||||
#!/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"
|
|
||||||
cd "$CI_TOPLEVEL_DIR"
|
|
||||||
|
|
||||||
CI_SRC_DIR="$CI_TOPLEVEL_DIR"
|
|
||||||
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"
|
|
||||||
|
|
||||||
function ci_init_build {
|
|
||||||
# Ensure that the mandatory variables are initialized.
|
|
||||||
CI_CMAKE="${CI_CMAKE:-cmake}"
|
|
||||||
CI_CTEST="${CI_CTEST:-ctest}"
|
|
||||||
CI_CMAKE_BUILD_TYPE="${CI_CMAKE_BUILD_TYPE:-Release}"
|
|
||||||
if [[ $CI_CMAKE_GENERATOR == "Visual Studio"* ]]
|
|
||||||
then
|
|
||||||
# Clean up incidental mixtures of Windows and Bash-on-Windows
|
|
||||||
# environment variables, to avoid confusing MSBuild.
|
|
||||||
[[ $TEMP && ( $Temp || $temp ) ]] && unset TEMP
|
|
||||||
[[ $TMP && ( $Tmp || $tmp ) ]] && unset TMP
|
|
||||||
# Ensure that CI_CMAKE_GENERATOR_PLATFORM is initialized for this generator.
|
|
||||||
[[ $CI_CMAKE_GENERATOR_PLATFORM ]] || {
|
|
||||||
ci_err_internal "missing \$CI_CMAKE_GENERATOR_PLATFORM"
|
|
||||||
}
|
|
||||||
elif [[ -x $(command -v ninja) ]]
|
|
||||||
then
|
|
||||||
CI_CMAKE_GENERATOR="${CI_CMAKE_GENERATOR:-Ninja}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_trace_build {
|
|
||||||
ci_info "## START OF CONFIGURATION ##"
|
|
||||||
ci_info "build arch: $CI_BUILD_ARCH"
|
|
||||||
ci_info "build system: $CI_BUILD_SYSTEM"
|
|
||||||
[[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && {
|
|
||||||
ci_info "target arch: $CI_TARGET_ARCH"
|
|
||||||
ci_info "target system: $CI_TARGET_SYSTEM"
|
|
||||||
}
|
|
||||||
ci_info "source directory: $CI_SRC_DIR"
|
|
||||||
ci_info "build directory: $CI_BUILD_DIR"
|
|
||||||
ci_info "install directory: $CI_INSTALL_DIR"
|
|
||||||
ci_info "environment option: \$CI_CMAKE: '$CI_CMAKE'"
|
|
||||||
ci_info "environment option: \$CI_CMAKE_GENERATOR: '$CI_CMAKE_GENERATOR'"
|
|
||||||
ci_info "environment option: \$CI_CMAKE_GENERATOR_PLATFORM: '$CI_CMAKE_GENERATOR_PLATFORM'"
|
|
||||||
ci_info "environment option: \$CI_CMAKE_BUILD_TYPE: '$CI_CMAKE_BUILD_TYPE'"
|
|
||||||
ci_info "environment option: \$CI_CMAKE_BUILD_FLAGS: '$CI_CMAKE_BUILD_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_CMAKE_TOOLCHAIN_FILE: '$CI_CMAKE_TOOLCHAIN_FILE'"
|
|
||||||
ci_info "environment option: \$CI_CMAKE_VARS: '$CI_CMAKE_VARS'"
|
|
||||||
ci_info "environment option: \$CI_CTEST: '$CI_CTEST'"
|
|
||||||
ci_info "environment option: \$CI_CTEST_FLAGS: '$CI_CTEST_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_CC: '$CI_CC'"
|
|
||||||
ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_AR: '$CI_AR'"
|
|
||||||
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'"
|
|
||||||
ci_info "executable: \$CI_CMAKE: $(command -V "$CI_CMAKE")"
|
|
||||||
ci_info "executable: \$CI_CTEST: $(command -V "$CI_CTEST")"
|
|
||||||
[[ $CI_CC ]] && {
|
|
||||||
ci_info "executable: \$CI_CC: $(command -V "$CI_CC")"
|
|
||||||
}
|
|
||||||
[[ $CI_AR ]] && {
|
|
||||||
ci_info "executable: \$CI_AR: $(command -V "$CI_AR")"
|
|
||||||
}
|
|
||||||
[[ $CI_RANLIB ]] && {
|
|
||||||
ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")"
|
|
||||||
}
|
|
||||||
ci_info "## END OF CONFIGURATION ##"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_cleanup_old_build {
|
|
||||||
ci_info "## START OF PRE-BUILD CLEANUP ##"
|
|
||||||
[[ ! -e $CI_BUILD_DIR && ! -e $CI_INSTALL_DIR ]] || {
|
|
||||||
ci_spawn rm -fr "$CI_BUILD_DIR"
|
|
||||||
ci_spawn rm -fr "$CI_INSTALL_DIR"
|
|
||||||
}
|
|
||||||
ci_info "## END OF PRE-BUILD CLEANUP ##"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_build {
|
|
||||||
ci_info "## START OF BUILD ##"
|
|
||||||
# Adjust the CI environment variables, as needed.
|
|
||||||
CI_CMAKE="$(command -v "$CI_CMAKE")" || ci_err "bad or missing \$CI_CMAKE"
|
|
||||||
ci_spawn "$CI_CMAKE" --version
|
|
||||||
CI_CTEST="$(command -v "$CI_CTEST")" || ci_err "bad or missing \$CI_CTEST"
|
|
||||||
ci_spawn "$CI_CTEST" --version
|
|
||||||
[[ $CI_CMAKE_GENERATOR == *"Ninja"* ]] && {
|
|
||||||
CI_NINJA="$(command -v ninja)" || ci_err "bad or missing ninja, no pun intended"
|
|
||||||
ci_spawn "$CI_NINJA" --version
|
|
||||||
}
|
|
||||||
[[ $CI_AR ]] && {
|
|
||||||
# Use the full path of CI_AR to work around a mysterious CMake error.
|
|
||||||
CI_AR="$(command -v "$CI_AR")" || ci_err "bad or missing \$CI_AR"
|
|
||||||
}
|
|
||||||
[[ $CI_RANLIB ]] && {
|
|
||||||
# Use the full path of CI_RANLIB to work around a mysterious CMake error.
|
|
||||||
CI_RANLIB="$(command -v "$CI_RANLIB")" || ci_err "bad or missing \$CI_RANLIB"
|
|
||||||
}
|
|
||||||
# Export the CMake environment variables.
|
|
||||||
[[ $CI_CMAKE_GENERATOR ]] && {
|
|
||||||
ci_spawn export CMAKE_GENERATOR="$CI_CMAKE_GENERATOR"
|
|
||||||
}
|
|
||||||
[[ $CI_CMAKE_GENERATOR_PLATFORM ]] && {
|
|
||||||
ci_spawn export CMAKE_GENERATOR_PLATFORM="$CI_CMAKE_GENERATOR_PLATFORM"
|
|
||||||
}
|
|
||||||
# Initialize and populate the local arrays.
|
|
||||||
local all_cmake_vars=()
|
|
||||||
local all_cmake_build_flags=()
|
|
||||||
local all_ctest_flags=()
|
|
||||||
[[ $CI_CMAKE_TOOLCHAIN_FILE ]] && {
|
|
||||||
all_cmake_vars+=("-DCMAKE_TOOLCHAIN_FILE=$CI_CMAKE_TOOLCHAIN_FILE")
|
|
||||||
}
|
|
||||||
[[ $CI_CC ]] && {
|
|
||||||
all_cmake_vars+=("-DCMAKE_C_COMPILER=$CI_CC")
|
|
||||||
}
|
|
||||||
[[ $CI_CC_FLAGS || $CI_SANITIZERS ]] && {
|
|
||||||
[[ $CI_SANITIZERS ]] && CI_CC_FLAGS+="${CI_CC_FLAGS:+" "}-fsanitize=$CI_SANITIZERS"
|
|
||||||
all_cmake_vars+=("-DCMAKE_C_FLAGS=$CI_CC_FLAGS")
|
|
||||||
}
|
|
||||||
[[ $CI_AR ]] && {
|
|
||||||
all_cmake_vars+=("-DCMAKE_AR=$CI_AR")
|
|
||||||
}
|
|
||||||
[[ $CI_RANLIB ]] && {
|
|
||||||
all_cmake_vars+=("-DCMAKE_RANLIB=$CI_RANLIB")
|
|
||||||
}
|
|
||||||
all_cmake_vars+=("-DCMAKE_BUILD_TYPE=$CI_CMAKE_BUILD_TYPE")
|
|
||||||
all_cmake_vars+=("-DCMAKE_VERBOSE_MAKEFILE=ON")
|
|
||||||
all_cmake_vars+=($CI_CMAKE_VARS)
|
|
||||||
all_cmake_build_flags+=($CI_CMAKE_BUILD_FLAGS)
|
|
||||||
all_ctest_flags+=($CI_CTEST_FLAGS)
|
|
||||||
# And... build!
|
|
||||||
ci_spawn mkdir -p "$CI_BUILD_DIR"
|
|
||||||
# Spawn "cmake ...".
|
|
||||||
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_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_BUILD_DIR" \
|
|
||||||
--config "$CI_CMAKE_BUILD_TYPE" \
|
|
||||||
--target clean \
|
|
||||||
"${all_cmake_build_flags[@]}"
|
|
||||||
}
|
|
||||||
ci_info "## END OF BUILD ##"
|
|
||||||
}
|
|
||||||
|
|
||||||
function usage {
|
|
||||||
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
|
||||||
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))
|
|
||||||
# And... go!
|
|
||||||
ci_init_build
|
|
||||||
ci_trace_build
|
|
||||||
[[ $# -eq 0 ]] || {
|
|
||||||
echo >&2 "error: unexpected argument: '$1'"
|
|
||||||
echo >&2 "note: this program accepts environment options only"
|
|
||||||
usage 2
|
|
||||||
}
|
|
||||||
ci_cleanup_old_build
|
|
||||||
ci_build
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
@ -1,182 +0,0 @@
|
|||||||
#!/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"
|
|
||||||
cd "$CI_TOPLEVEL_DIR"
|
|
||||||
|
|
||||||
CI_SRC_DIR="$CI_TOPLEVEL_DIR"
|
|
||||||
CI_OUT_DIR="$CI_TOPLEVEL_DIR/out"
|
|
||||||
CI_BUILD_DIR="$CI_OUT_DIR/ci_verify_configure.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.build"
|
|
||||||
CI_INSTALL_DIR="$CI_OUT_DIR/ci_verify_configure.$CI_TARGET_SYSTEM.$CI_TARGET_ARCH.install"
|
|
||||||
|
|
||||||
function ci_init_build {
|
|
||||||
# Ensure that the mandatory variables are initialized.
|
|
||||||
CI_MAKE="${CI_MAKE:-make}"
|
|
||||||
[[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] || {
|
|
||||||
# For native builds, set CI_CC to "cc" by default if the cc command is available.
|
|
||||||
# The configure script defaults CC to "gcc", which is not always a good idea.
|
|
||||||
[[ -x $(command -v cc) ]] && CI_CC="${CI_CC:-cc}"
|
|
||||||
}
|
|
||||||
# Ensure that the CI_ variables that cannot be customized reliably are not initialized.
|
|
||||||
[[ ! $CI_CONFIGURE_VARS ]] || {
|
|
||||||
ci_err "unsupported: \$CI_CONFIGURE_VARS='$CI_CONFIGURE_VARS'"
|
|
||||||
}
|
|
||||||
[[ ! $CI_MAKE_VARS ]] || {
|
|
||||||
ci_err "unsupported: \$CI_MAKE_VARS='$CI_MAKE_VARS'"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_trace_build {
|
|
||||||
ci_info "## START OF CONFIGURATION ##"
|
|
||||||
ci_info "build arch: $CI_BUILD_ARCH"
|
|
||||||
ci_info "build system: $CI_BUILD_SYSTEM"
|
|
||||||
[[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && {
|
|
||||||
ci_info "target arch: $CI_TARGET_ARCH"
|
|
||||||
ci_info "target system: $CI_TARGET_SYSTEM"
|
|
||||||
}
|
|
||||||
ci_info "source directory: $CI_SRC_DIR"
|
|
||||||
ci_info "build directory: $CI_BUILD_DIR"
|
|
||||||
ci_info "install directory: $CI_INSTALL_DIR"
|
|
||||||
ci_info "environment option: \$CI_CONFIGURE_FLAGS: '$CI_CONFIGURE_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_MAKE: '$CI_MAKE'"
|
|
||||||
ci_info "environment option: \$CI_MAKE_FLAGS: '$CI_MAKE_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_CC: '$CI_CC'"
|
|
||||||
ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_CPP: '$CI_CPP'"
|
|
||||||
ci_info "environment option: \$CI_CPP_FLAGS: '$CI_CPP_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_AR: '$CI_AR'"
|
|
||||||
ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'"
|
|
||||||
ci_info "environment option: \$CI_LD: '$CI_LD'"
|
|
||||||
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'"
|
|
||||||
ci_info "executable: \$CI_MAKE: $(command -V "$CI_MAKE")"
|
|
||||||
[[ $CI_CC ]] && {
|
|
||||||
ci_info "executable: \$CI_CC: $(command -V "$CI_CC")"
|
|
||||||
}
|
|
||||||
[[ $CI_CPP ]] && {
|
|
||||||
ci_info "executable: \$CI_CPP: $(command -V "$CI_CPP")"
|
|
||||||
}
|
|
||||||
[[ $CI_AR ]] && {
|
|
||||||
ci_info "executable: \$CI_AR: $(command -V "$CI_AR")"
|
|
||||||
}
|
|
||||||
[[ $CI_RANLIB ]] && {
|
|
||||||
ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")"
|
|
||||||
}
|
|
||||||
[[ $CI_LD ]] && {
|
|
||||||
ci_info "executable: \$CI_LD: $(command -V "$CI_LD")"
|
|
||||||
}
|
|
||||||
ci_info "## END OF CONFIGURATION ##"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_cleanup_old_build {
|
|
||||||
ci_info "## START OF PRE-BUILD CLEANUP ##"
|
|
||||||
[[ ! -e $CI_BUILD_DIR && ! -e $CI_INSTALL_DIR ]] || {
|
|
||||||
ci_spawn rm -fr "$CI_BUILD_DIR"
|
|
||||||
ci_spawn rm -fr "$CI_INSTALL_DIR"
|
|
||||||
}
|
|
||||||
[[ ! -e "$CI_SRC_DIR/config.status" ]] || {
|
|
||||||
ci_warn "unexpected build configuration file: '$CI_SRC_DIR/config.status'"
|
|
||||||
if ci_expr $((CI_FORCE))
|
|
||||||
then
|
|
||||||
# Delete the old config and (possibly) the old build.
|
|
||||||
ci_info "note: forcing an in-tree build cleanup"
|
|
||||||
if [[ -f $CI_SRC_DIR/Makefile ]]
|
|
||||||
then
|
|
||||||
ci_spawn make -C "$CI_SRC_DIR" distclean
|
|
||||||
else
|
|
||||||
ci_spawn rm -fr "$CI_SRC_DIR"/config.{log,status}
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Alert the user, but do not delete their files.
|
|
||||||
ci_warn "the configure script might fail"
|
|
||||||
ci_info "hint: consider using the option \$CI_FORCE=1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
ci_info "## END OF PRE-BUILD CLEANUP ##"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_build {
|
|
||||||
ci_info "## START OF BUILD ##"
|
|
||||||
# Export the configure build environment.
|
|
||||||
[[ $CI_CC ]] && ci_spawn export CC="$CI_CC"
|
|
||||||
[[ $CI_CC_FLAGS ]] && ci_spawn export CFLAGS="$CI_CC_FLAGS"
|
|
||||||
[[ $CI_CPP ]] && ci_spawn export CPP="$CI_CPP"
|
|
||||||
[[ $CI_CPP_FLAGS ]] && ci_spawn export CPPFLAGS="$CI_CPP_FLAGS"
|
|
||||||
[[ $CI_AR ]] && ci_spawn export AR="$CI_AR"
|
|
||||||
[[ $CI_RANLIB ]] && ci_spawn export RANLIB="$CI_RANLIB"
|
|
||||||
[[ $CI_LD ]] && ci_spawn export LD="$CI_LD"
|
|
||||||
[[ $CI_LD_FLAGS ]] && ci_spawn export LDFLAGS="$CI_LD_FLAGS"
|
|
||||||
[[ $CI_SANITIZERS ]] && {
|
|
||||||
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
|
|
||||||
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
|
|
||||||
}
|
|
||||||
ci_expr $((CI_NO_INSTALL)) || {
|
|
||||||
# Spawn "make install" if installation is not disabled.
|
|
||||||
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS install
|
|
||||||
}
|
|
||||||
ci_expr $((CI_NO_CLEAN)) || {
|
|
||||||
# Spawn "make clean" and "make distclean" if cleaning is not disabled.
|
|
||||||
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS clean
|
|
||||||
ci_spawn "$CI_MAKE" $CI_MAKE_FLAGS distclean
|
|
||||||
}
|
|
||||||
ci_info "## END OF BUILD ##"
|
|
||||||
}
|
|
||||||
|
|
||||||
function usage {
|
|
||||||
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
|
||||||
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))
|
|
||||||
# And... go!
|
|
||||||
ci_init_build
|
|
||||||
ci_trace_build
|
|
||||||
[[ $# -eq 0 ]] || {
|
|
||||||
echo >&2 "error: unexpected argument: '$1'"
|
|
||||||
echo >&2 "note: this program accepts environment options only"
|
|
||||||
usage 2
|
|
||||||
}
|
|
||||||
ci_cleanup_old_build
|
|
||||||
ci_build
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
@ -1,200 +0,0 @@
|
|||||||
#!/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"
|
|
||||||
cd "$CI_TOPLEVEL_DIR"
|
|
||||||
|
|
||||||
CI_SRC_DIR="$CI_TOPLEVEL_DIR"
|
|
||||||
|
|
||||||
function ci_init_build {
|
|
||||||
# Ensure that the mandatory variables are initialized.
|
|
||||||
CI_MAKE="${CI_MAKE:-make}"
|
|
||||||
case "$CI_CC" in
|
|
||||||
( *clang* )
|
|
||||||
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.clang"}" ;;
|
|
||||||
( *gcc* )
|
|
||||||
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.gcc"}" ;;
|
|
||||||
( * )
|
|
||||||
CI_MAKEFILES="${CI_MAKEFILES:-"scripts/makefile.std"}" ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_trace_build {
|
|
||||||
ci_info "## START OF CONFIGURATION ##"
|
|
||||||
ci_info "build arch: $CI_BUILD_ARCH"
|
|
||||||
ci_info "build system: $CI_BUILD_SYSTEM"
|
|
||||||
[[ "$CI_TARGET_SYSTEM.$CI_TARGET_ARCH" != "$CI_BUILD_SYSTEM.$CI_BUILD_ARCH" ]] && {
|
|
||||||
ci_info "target arch: $CI_TARGET_ARCH"
|
|
||||||
ci_info "target system: $CI_TARGET_SYSTEM"
|
|
||||||
}
|
|
||||||
ci_info "source directory: $CI_SRC_DIR"
|
|
||||||
ci_info "environment option: \$CI_MAKEFILES: '$CI_MAKEFILES'"
|
|
||||||
ci_info "environment option: \$CI_MAKE: '$CI_MAKE'"
|
|
||||||
ci_info "environment option: \$CI_MAKE_FLAGS: '$CI_MAKE_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_MAKE_VARS: '$CI_MAKE_VARS'"
|
|
||||||
ci_info "environment option: \$CI_CC: '$CI_CC'"
|
|
||||||
ci_info "environment option: \$CI_CC_FLAGS: '$CI_CC_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_CPP: '$CI_CPP'"
|
|
||||||
ci_info "environment option: \$CI_CPP_FLAGS: '$CI_CPP_FLAGS'"
|
|
||||||
ci_info "environment option: \$CI_AR: '$CI_AR'"
|
|
||||||
ci_info "environment option: \$CI_RANLIB: '$CI_RANLIB'"
|
|
||||||
ci_info "environment option: \$CI_LD: '$CI_LD'"
|
|
||||||
ci_info "environment option: \$CI_LD_FLAGS: '$CI_LD_FLAGS'"
|
|
||||||
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")"
|
|
||||||
[[ $CI_CC ]] && {
|
|
||||||
ci_info "executable: \$CI_CC: $(command -V "$CI_CC")"
|
|
||||||
}
|
|
||||||
[[ $CI_CPP ]] && {
|
|
||||||
ci_info "executable: \$CI_CPP: $(command -V "$CI_CPP")"
|
|
||||||
}
|
|
||||||
[[ $CI_AR ]] && {
|
|
||||||
ci_info "executable: \$CI_AR: $(command -V "$CI_AR")"
|
|
||||||
}
|
|
||||||
[[ $CI_RANLIB ]] && {
|
|
||||||
ci_info "executable: \$CI_RANLIB: $(command -V "$CI_RANLIB")"
|
|
||||||
}
|
|
||||||
[[ $CI_LD ]] && {
|
|
||||||
ci_info "executable: \$CI_LD: $(command -V "$CI_LD")"
|
|
||||||
}
|
|
||||||
ci_info "## END OF CONFIGURATION ##"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_cleanup_old_build {
|
|
||||||
# Any old makefile-based build will most likely leave a mess
|
|
||||||
# of object files behind if interrupted, e.g., via Ctrl+C.
|
|
||||||
# There may be other files behind, depending on what makefile
|
|
||||||
# had been used. We cannot easily enumerate all of those.
|
|
||||||
# Fortunately, for a clean makefiles-based build, it should be
|
|
||||||
# sufficient to remove the old object files only.
|
|
||||||
ci_info "## START OF PRE-BUILD CLEANUP ##"
|
|
||||||
local find_args=(-maxdepth 1 \( -iname "*.o" -o -iname "*.obj" \))
|
|
||||||
[[ ! $(find "$CI_SRC_DIR" "${find_args[@]}" | head -n1) ]] || {
|
|
||||||
ci_warn "unexpected build found in '$CI_SRC_DIR'"
|
|
||||||
if ci_expr $((CI_FORCE))
|
|
||||||
then
|
|
||||||
# Delete the old build.
|
|
||||||
local my_file
|
|
||||||
find "$CI_SRC_DIR" "${find_args[@]}" |
|
|
||||||
while IFS="" read -r my_file
|
|
||||||
do
|
|
||||||
ci_spawn rm -fr "$my_file"
|
|
||||||
done
|
|
||||||
ci_info "## END OF PRE-BUILD CLEANUP ##"
|
|
||||||
else
|
|
||||||
# Alert the user, but do not delete their existing files,
|
|
||||||
# and do not mess up their existing build.
|
|
||||||
ci_info "hint: consider using the option \$CI_FORCE=1"
|
|
||||||
ci_err "unable to continue"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_build {
|
|
||||||
ci_info "## START OF BUILD ##"
|
|
||||||
# Initialize and populate the local arrays.
|
|
||||||
local all_make_flags=()
|
|
||||||
local all_make_vars=()
|
|
||||||
[[ $CI_MAKE_FLAGS ]] && {
|
|
||||||
all_make_flags+=($CI_MAKE_FLAGS)
|
|
||||||
}
|
|
||||||
[[ $CI_CC ]] && {
|
|
||||||
all_make_vars+=("CC=$CI_CC")
|
|
||||||
}
|
|
||||||
[[ $CI_CC_FLAGS || $CI_SANITIZERS ]] && {
|
|
||||||
[[ $CI_SANITIZERS ]] && CI_CC_FLAGS="${CI_CC_FLAGS:-"-O2"} -fsanitize=$CI_SANITIZERS"
|
|
||||||
all_make_vars+=("CFLAGS=$CI_CC_FLAGS")
|
|
||||||
}
|
|
||||||
[[ $CI_CPP ]] && {
|
|
||||||
all_make_vars+=("CPP=$CI_CPP")
|
|
||||||
}
|
|
||||||
[[ $CI_CPP_FLAGS ]] && {
|
|
||||||
all_make_vars+=("CPPFLAGS=$CI_CPP_FLAGS")
|
|
||||||
}
|
|
||||||
[[ $CI_AR ]] && {
|
|
||||||
all_make_vars+=("AR=$CI_AR")
|
|
||||||
}
|
|
||||||
[[ $CI_RANLIB ]] && {
|
|
||||||
all_make_vars+=("RANLIB=$CI_RANLIB")
|
|
||||||
}
|
|
||||||
[[ $CI_LD ]] && {
|
|
||||||
all_make_vars+=("LD=$CI_LD")
|
|
||||||
}
|
|
||||||
[[ $CI_LD_FLAGS || $CI_SANITIZERS ]] && {
|
|
||||||
[[ $CI_SANITIZERS ]] && CI_LD_FLAGS+="${CI_LD_FLAGS:+" "}-fsanitize=$CI_SANITIZERS"
|
|
||||||
all_make_vars+=("LDFLAGS=$CI_LD_FLAGS")
|
|
||||||
}
|
|
||||||
[[ $CI_LIBS ]] && {
|
|
||||||
all_make_vars+=("LIBS=$CI_LIBS")
|
|
||||||
}
|
|
||||||
all_make_vars+=($CI_MAKE_VARS)
|
|
||||||
# And... build!
|
|
||||||
local my_makefile
|
|
||||||
for my_makefile in $CI_MAKEFILES
|
|
||||||
do
|
|
||||||
ci_info "using makefile: $my_makefile"
|
|
||||||
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" \
|
|
||||||
"${all_make_flags[@]}" \
|
|
||||||
"${all_make_vars[@]}" \
|
|
||||||
test
|
|
||||||
}
|
|
||||||
ci_expr $((CI_NO_CLEAN)) || {
|
|
||||||
# Spawn "make clean" if cleaning is not disabled.
|
|
||||||
ci_spawn "$CI_MAKE" -f "$my_makefile" \
|
|
||||||
"${all_make_flags[@]}" \
|
|
||||||
"${all_make_vars[@]}" \
|
|
||||||
clean
|
|
||||||
}
|
|
||||||
done
|
|
||||||
ci_info "## END OF BUILD ##"
|
|
||||||
}
|
|
||||||
|
|
||||||
function usage {
|
|
||||||
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
|
||||||
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))
|
|
||||||
# And... go!
|
|
||||||
ci_init_build
|
|
||||||
ci_trace_build
|
|
||||||
[[ $# -eq 0 ]] || {
|
|
||||||
echo >&2 "error: unexpected argument: '$1'"
|
|
||||||
echo >&2 "note: this program accepts environment options only"
|
|
||||||
usage 2
|
|
||||||
}
|
|
||||||
ci_cleanup_old_build
|
|
||||||
ci_build
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
@ -1,191 +0,0 @@
|
|||||||
#!/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"
|
|
||||||
cd "$CI_TOPLEVEL_DIR"
|
|
||||||
|
|
||||||
# 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:" "$@"
|
|
||||||
"$BASH" "$my_script" "$@"
|
|
||||||
echo "$my_result" | "$BASH" --posix || ci_err "bad shellify output"
|
|
||||||
echo "$my_result"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_init_version_verification {
|
|
||||||
ci_info "## START OF VERIFICATION ##"
|
|
||||||
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*"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_VER_STRING != $my_expect*"
|
|
||||||
fi
|
|
||||||
my_expect=$((PNG_LIBPNG_VER_MAJOR*10000 + PNG_LIBPNG_VER_MINOR*100 + PNG_LIBPNG_VER_RELEASE))
|
|
||||||
if [[ "$PNG_LIBPNG_VER" == "$my_expect" ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNG_LIBPNG_VER == $my_expect"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_VER != $my_expect"
|
|
||||||
fi
|
|
||||||
my_expect=$((PNG_LIBPNG_VER_MAJOR*10 + PNG_LIBPNG_VER_MINOR))
|
|
||||||
if [[ "$PNG_LIBPNG_VER_SHAREDLIB" == "$my_expect" ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNG_LIBPNG_VER_SHAREDLIB == $my_expect"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_VER_SHAREDLIB != $my_expect"
|
|
||||||
fi
|
|
||||||
if [[ "$PNG_LIBPNG_VER_SONUM" == "$my_expect" ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNG_LIBPNG_VER_SONUM == $my_expect"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_VER_SONUM != $my_expect"
|
|
||||||
fi
|
|
||||||
if [[ "$PNG_LIBPNG_VER_DLLNUM" == "$my_expect" ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNG_LIBPNG_VER_DLLNUM == $my_expect"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_VER_DLLNUM != $my_expect"
|
|
||||||
fi
|
|
||||||
if [[ "$PNG_LIBPNG_VER_BUILD" == [01] ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNG_LIBPNG_VER_BUILD == [01]"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD != [01]"
|
|
||||||
fi
|
|
||||||
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
|
|
||||||
if [[ $PNG_LIBPNG_VER_BUILD -eq 0 ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNG_LIBPNG_VER_BUILD -eq 0"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -ne 0"
|
|
||||||
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_STABLE"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_STABLE"
|
|
||||||
fi
|
|
||||||
elif [[ "$PNG_LIBPNG_VER_STRING" == "$my_expect".git ]]
|
|
||||||
then
|
|
||||||
if [[ $PNG_LIBPNG_VER_BUILD -ne 0 ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNG_LIBPNG_VER_BUILD -ne 0"
|
|
||||||
else
|
|
||||||
ci_err "mismatched: \$PNG_LIBPNG_VER_BUILD -eq 0"
|
|
||||||
fi
|
|
||||||
if [[ $PNG_LIBPNG_BUILD_BASE_TYPE -ne $PNG_LIBPNG_BUILD_STABLE ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNG_LIBPNG_BUILD_BASE_TYPE -ne \$PNG_LIBPNG_BUILD_STABLE"
|
|
||||||
else
|
|
||||||
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: 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: 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: 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"
|
|
||||||
ci_info "matched: \$PNGLIB_SUBREVISION == 0"
|
|
||||||
elif [[ "$PNGLIB_VERSION.$PNGLIB_SUBREVISION" == "$PNG_LIBPNG_VER_STRING" ]]
|
|
||||||
then
|
|
||||||
ci_info "matched: \$PNGLIB_VERSION.\$PNGLIB_SUBREVISION == \$PNG_LIBPNG_VER_STRING"
|
|
||||||
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 ##"
|
|
||||||
# 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 {
|
|
||||||
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
|
||||||
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 ]] || {
|
|
||||||
echo >&2 "error: unexpected argument: '$1'"
|
|
||||||
usage 2
|
|
||||||
}
|
|
||||||
# And... go!
|
|
||||||
ci_verify_version
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
111
ci/lib/ci.lib.sh
111
ci/lib/ci.lib.sh
@ -1,111 +0,0 @@
|
|||||||
# 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
|
|
||||||
|
|
||||||
test -f "$BASH_SOURCE" || {
|
|
||||||
echo >&2 "warning: this module requires Bash version 3 or newer"
|
|
||||||
}
|
|
||||||
test "${#BASH_SOURCE[@]}" -gt 1 || {
|
|
||||||
echo >&2 "warning: this module should be sourced from a Bash script"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Reset the locale to avoid surprises from locale-dependent commands.
|
|
||||||
export LC_ALL=C
|
|
||||||
export LANG=C
|
|
||||||
export LANGUAGE=C
|
|
||||||
|
|
||||||
# Reset CDPATH to avoid surprises from the "cd" command.
|
|
||||||
export CDPATH=""
|
|
||||||
|
|
||||||
# Initialize the global constants CI_SCRIPT_{NAME,DIR} and CI_TOPLEVEL_DIR.
|
|
||||||
CI_SCRIPT_NAME="$(basename -- "$0")"
|
|
||||||
CI_SCRIPT_DIR="$(cd "$(dirname -- "$0")" && pwd)"
|
|
||||||
CI_TOPLEVEL_DIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
||||||
|
|
||||||
# Initialize the global constants CI_BUILD_{...} for the host build platform.
|
|
||||||
CI_BUILD_ARCH="${CI_BUILD_ARCH:-"$(uname -m | tr 'A-Z/\.-' 'a-z____')"}"
|
|
||||||
CI_BUILD_SYSTEM="${CI_BUILD_SYSTEM:-"$(uname -s | tr 'A-Z/\.-' 'a-z____')"}"
|
|
||||||
|
|
||||||
# Initialize the global constants CI_TARGET_{...} for the target platform.
|
|
||||||
CI_TARGET_ARCH="${CI_TARGET_ARCH:-"$CI_BUILD_ARCH"}"
|
|
||||||
CI_TARGET_SYSTEM="${CI_TARGET_SYSTEM:-"$CI_BUILD_SYSTEM"}"
|
|
||||||
|
|
||||||
function ci_info {
|
|
||||||
printf >&2 "%s: %s\\n" "$CI_SCRIPT_NAME" "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_warn {
|
|
||||||
printf >&2 "%s: warning: %s\\n" "$CI_SCRIPT_NAME" "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_err {
|
|
||||||
printf >&2 "%s: error: %s\\n" "$CI_SCRIPT_NAME" "$*"
|
|
||||||
exit 2
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_err_internal {
|
|
||||||
printf >&2 "%s: internal error: %s\\n" "$CI_SCRIPT_NAME" "$*"
|
|
||||||
printf >&2 "ABORTED\\n"
|
|
||||||
# Exit with the conventional SIGABRT code.
|
|
||||||
exit 134
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_expr {
|
|
||||||
if [[ ${*:-0} == [0-9] ]]
|
|
||||||
then
|
|
||||||
# This is the same as in the else-branch below, albeit much faster
|
|
||||||
# for our intended use cases.
|
|
||||||
return $((!$1))
|
|
||||||
else
|
|
||||||
# The funny-looking compound command "... && return $? || return $?"
|
|
||||||
# allows the execution to continue uninterrupted under "set -e".
|
|
||||||
expr >/dev/null "$@" && return $? || return $?
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function ci_spawn {
|
|
||||||
printf >&2 "%s: executing:" "$CI_SCRIPT_NAME"
|
|
||||||
printf >&2 " %q" "$@"
|
|
||||||
printf >&2 "\\n"
|
|
||||||
"$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Ensure that the internal initialization is correct.
|
|
||||||
[[ $CI_TOPLEVEL_DIR/ci/lib/ci.lib.sh -ef ${BASH_SOURCE[0]} ]] || {
|
|
||||||
ci_err_internal "bad or missing \$CI_TOPLEVEL_DIR"
|
|
||||||
}
|
|
||||||
[[ $CI_SCRIPT_DIR/$CI_SCRIPT_NAME -ef $0 ]] || {
|
|
||||||
ci_err_internal "bad or missing \$CI_SCRIPT_DIR/\$CI_SCRIPT_NAME"
|
|
||||||
}
|
|
||||||
[[ $CI_BUILD_ARCH && $CI_BUILD_SYSTEM ]] || {
|
|
||||||
ci_err_internal "missing \$CI_BUILD_ARCH or \$CI_BUILD_SYSTEM"
|
|
||||||
}
|
|
||||||
[[ $CI_TARGET_ARCH && $CI_TARGET_SYSTEM ]] || {
|
|
||||||
ci_err_internal "missing \$CI_TARGET_ARCH or \$CI_TARGET_SYSTEM"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Ensure that the user initialization is correct.
|
|
||||||
[[ ${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'"
|
|
||||||
}
|
|
||||||
[[ ${CI_NO_INSTALL:-0} == [01] ]] || {
|
|
||||||
ci_err "bad boolean option: \$CI_NO_INSTALL: '$CI_NO_INSTALL'"
|
|
||||||
}
|
|
||||||
[[ ${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
|
|
@ -1,48 +0,0 @@
|
|||||||
#!/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 "$@"
|
|
@ -1,49 +0,0 @@
|
|||||||
#!/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 "$@"
|
|
@ -1,49 +0,0 @@
|
|||||||
#!/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 "$@"
|
|
@ -1,46 +0,0 @@
|
|||||||
#!/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 "$@"
|
|
@ -1,16 +0,0 @@
|
|||||||
# 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"
|
|
@ -1,16 +0,0 @@
|
|||||||
# 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"
|
|
@ -1,16 +0,0 @@
|
|||||||
# 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"
|
|
@ -1,16 +0,0 @@
|
|||||||
# 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"
|
|
@ -1,18 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,18 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,15 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,15 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,14 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,14 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,14 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,14 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,18 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,18 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,19 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,18 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,18 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
@ -1,18 +0,0 @@
|
|||||||
# 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
|
|
||||||
"
|
|
45
compile
Executable file → Normal file
45
compile
Executable file → Normal file
@ -1,9 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
scriptversion=2025-06-18.21; # UTC
|
scriptversion=2012-10-14.11; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,7 +17,7 @@ scriptversion=2025-06-18.21; # UTC
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
@ -37,11 +37,11 @@ IFS=" "" $nl"
|
|||||||
|
|
||||||
file_conv=
|
file_conv=
|
||||||
|
|
||||||
# func_file_conv build_file unneeded_conversions
|
# func_file_conv build_file lazy
|
||||||
# Convert a $build file to $host form and store it in $file
|
# Convert a $build file to $host form and store it in $file
|
||||||
# Currently only supports Windows hosts. If the determined conversion
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
|
# type is listed in (the comma separated) LAZY, no conversion will
|
||||||
# conversion will take place.
|
# take place.
|
||||||
func_file_conv ()
|
func_file_conv ()
|
||||||
{
|
{
|
||||||
file=$1
|
file=$1
|
||||||
@ -51,20 +51,9 @@ func_file_conv ()
|
|||||||
# lazily determine how to convert abs files
|
# lazily determine how to convert abs files
|
||||||
case `uname -s` in
|
case `uname -s` in
|
||||||
MINGW*)
|
MINGW*)
|
||||||
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
|
file_conv=mingw
|
||||||
# MSYS2 environment.
|
|
||||||
file_conv=cygwin
|
|
||||||
else
|
|
||||||
# Original MinGW environment.
|
|
||||||
file_conv=mingw
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
MSYS*)
|
|
||||||
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
|
|
||||||
file_conv=cygwin
|
|
||||||
;;
|
;;
|
||||||
CYGWIN*)
|
CYGWIN*)
|
||||||
# Cygwin environment.
|
|
||||||
file_conv=cygwin
|
file_conv=cygwin
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -74,14 +63,12 @@ func_file_conv ()
|
|||||||
fi
|
fi
|
||||||
case $file_conv/,$2, in
|
case $file_conv/,$2, in
|
||||||
*,$file_conv,*)
|
*,$file_conv,*)
|
||||||
# This is the optimization mentioned above:
|
|
||||||
# If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
|
|
||||||
;;
|
;;
|
||||||
mingw/*)
|
mingw/*)
|
||||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
;;
|
;;
|
||||||
cygwin/*)
|
cygwin/*)
|
||||||
file=`cygpath -w "$file" || echo "$file"`
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
;;
|
;;
|
||||||
wine/*)
|
wine/*)
|
||||||
file=`winepath -w "$file" || echo "$file"`
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
@ -156,7 +143,7 @@ func_cl_wrapper ()
|
|||||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
eat=1
|
eat=1
|
||||||
case $2 in
|
case $2 in
|
||||||
*.o | *.lo | *.[oO][bB][jJ])
|
*.o | *.[oO][bB][jJ])
|
||||||
func_file_conv "$2"
|
func_file_conv "$2"
|
||||||
set x "$@" -Fo"$file"
|
set x "$@" -Fo"$file"
|
||||||
shift
|
shift
|
||||||
@ -261,18 +248,14 @@ If you are trying to build a whole package this is not the
|
|||||||
right script to run: please start by reading the file 'INSTALL'.
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
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
|
EOF
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
-v | --v*)
|
-v | --v*)
|
||||||
echo "compile (GNU Automake) $scriptversion"
|
echo "compile $scriptversion"
|
||||||
exit $?
|
exit $?
|
||||||
;;
|
;;
|
||||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
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...
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -356,9 +339,9 @@ exit $ret
|
|||||||
# Local Variables:
|
# Local Variables:
|
||||||
# mode: shell-script
|
# mode: shell-script
|
||||||
# sh-indentation: 2
|
# sh-indentation: 2
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
# time-stamp-start: "scriptversion="
|
# 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-time-zone: "UTC"
|
||||||
# time-stamp-end: "; # UTC"
|
# time-stamp-end: "; # UTC"
|
||||||
# End:
|
# End:
|
||||||
|
1774
config.guess
vendored
Executable file → Normal file
1774
config.guess
vendored
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
83
config.h.in
83
config.h.in
@ -3,27 +3,33 @@
|
|||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
#undef HAVE_DLFCN_H
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
/* Define to 1 if you have the 'feenableexcept' function. */
|
/* Define to 1 if you have the `feenableexcept' function. */
|
||||||
#undef HAVE_FEENABLEEXCEPT
|
#undef HAVE_FEENABLEEXCEPT
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
#undef HAVE_INTTYPES_H
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
/* Define to 1 if you have the 'm' library (-lm). */
|
/* Define to 1 if you have the `m' library (-lm). */
|
||||||
#undef HAVE_LIBM
|
#undef HAVE_LIBM
|
||||||
|
|
||||||
/* Define to 1 if you have the 'z' library (-lz). */
|
/* Define to 1 if you have the `z' library (-lz). */
|
||||||
#undef HAVE_LIBZ
|
#undef HAVE_LIBZ
|
||||||
|
|
||||||
/* Define to 1 if you have the 'pow' function. */
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
|
#undef HAVE_MALLOC_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memset' function. */
|
||||||
|
#undef HAVE_MEMSET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `pow' function. */
|
||||||
#undef HAVE_POW
|
#undef HAVE_POW
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
#undef HAVE_STDINT_H
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdio.h> header file. */
|
|
||||||
#undef HAVE_STDIO_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#undef HAVE_STDLIB_H
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
@ -75,64 +81,31 @@
|
|||||||
/* Enable ARM Neon optimizations */
|
/* Enable ARM Neon optimizations */
|
||||||
#undef PNG_ARM_NEON_OPT
|
#undef PNG_ARM_NEON_OPT
|
||||||
|
|
||||||
/* Enable Intel SSE optimizations */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef PNG_INTEL_SSE_OPT
|
|
||||||
|
|
||||||
/* Enable LOONGARCH LSX optimizations */
|
|
||||||
#undef PNG_LOONGARCH_LSX_OPT
|
|
||||||
|
|
||||||
/* Turn on MIPS MMI optimizations at run-time */
|
|
||||||
#undef PNG_MIPS_MMI_API_SUPPORTED
|
|
||||||
|
|
||||||
/* Check for MIPS MMI support at run-time */
|
|
||||||
#undef PNG_MIPS_MMI_CHECK_SUPPORTED
|
|
||||||
|
|
||||||
/* Enable MIPS MMI optimizations */
|
|
||||||
#undef PNG_MIPS_MMI_OPT
|
|
||||||
|
|
||||||
/* Turn on MIPS MSA optimizations at run-time */
|
|
||||||
#undef PNG_MIPS_MSA_API_SUPPORTED
|
|
||||||
|
|
||||||
/* Check for MIPS MSA support at run-time */
|
|
||||||
#undef PNG_MIPS_MSA_CHECK_SUPPORTED
|
|
||||||
|
|
||||||
/* Enable MIPS MSA optimizations */
|
|
||||||
#undef PNG_MIPS_MSA_OPT
|
|
||||||
|
|
||||||
/* Turn on POWERPC VSX optimizations at run-time */
|
|
||||||
#undef PNG_POWERPC_VSX_API_SUPPORTED
|
|
||||||
|
|
||||||
/* Check for POWERPC VSX support at run-time */
|
|
||||||
#undef PNG_POWERPC_VSX_CHECK_SUPPORTED
|
|
||||||
|
|
||||||
/* Enable POWERPC VSX optimizations */
|
|
||||||
#undef PNG_POWERPC_VSX_OPT
|
|
||||||
|
|
||||||
/* 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. */
|
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
/* Define to 1 if your <sys/time.h> declares 'struct tm'. */
|
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||||
#undef TM_IN_SYS_TIME
|
#undef TM_IN_SYS_TIME
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#undef const
|
||||||
|
|
||||||
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
||||||
nothing if this is not supported. Do not define if restrict is
|
nothing if this is not supported. Do not define if restrict is
|
||||||
supported only directly. */
|
supported directly. */
|
||||||
#undef restrict
|
#undef restrict
|
||||||
/* Work around a bug in older versions of Sun C++, which did not
|
/* Work around a bug in Sun C++: it does not support _Restrict or
|
||||||
#define __restrict__ or support _Restrict or __restrict__
|
__restrict__, even though the corresponding Sun C compiler ends up with
|
||||||
even though the corresponding Sun C compiler ended up with
|
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
||||||
"#define restrict _Restrict" or "#define restrict __restrict__"
|
previous line. Perhaps some future version of Sun C++ will work with
|
||||||
in the previous line. This workaround can be removed once
|
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
||||||
we assume Oracle Developer Studio 12.5 (2016) or later. */
|
#if defined __SUNPRO_CC && !defined __RESTRICT
|
||||||
#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
|
|
||||||
# define _Restrict
|
# define _Restrict
|
||||||
# define __restrict__
|
# define __restrict__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
|
#undef size_t
|
||||||
|
3381
config.sub
vendored
Executable file → Normal file
3381
config.sub
vendored
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
625
configure.ac
625
configure.ac
@ -1,12 +1,5 @@
|
|||||||
# configure.ac
|
# configure.ac
|
||||||
|
|
||||||
# Copyright (c) 2018-2024 Cosmin Truta
|
|
||||||
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
|
||||||
|
|
||||||
# This code is released under the libpng license.
|
|
||||||
# For conditions of distribution and use, see the disclaimer
|
|
||||||
# and license in png.h
|
|
||||||
|
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl
|
dnl
|
||||||
dnl Minor upgrades (compatible ABI): increment the package version
|
dnl Minor upgrades (compatible ABI): increment the package version
|
||||||
@ -21,160 +14,65 @@ dnl Makefile.am to upgrade the package name.
|
|||||||
dnl This is here to prevent earlier autoconf from being used, it
|
dnl This is here to prevent earlier autoconf from being used, it
|
||||||
dnl should not be necessary to regenerate configure if the time
|
dnl should not be necessary to regenerate configure if the time
|
||||||
dnl stamps are correct
|
dnl stamps are correct
|
||||||
AC_PREREQ([2.68])
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
dnl Version number stuff here:
|
dnl Version number stuff here:
|
||||||
|
|
||||||
AC_INIT([libpng],[1.6.51.git],[png-mng-implement@lists.sourceforge.net])
|
AC_INIT([libpng], [1.5.29], [png-mng-implement@lists.sourceforge.net])
|
||||||
AC_CONFIG_MACRO_DIR([scripts/autoconf])
|
AM_INIT_AUTOMAKE([1.13 serial-tests subdir-objects])
|
||||||
|
dnl stop configure from automagically running automake
|
||||||
# libpng does not follow GNU file name conventions (hence 'foreign')
|
|
||||||
# color-tests requires automake 1.11 or later
|
|
||||||
# silent-rules requires automake 1.11 or later
|
|
||||||
# dist-xz requires automake 1.11 or later
|
|
||||||
# 1.12.2 fixes a security issue in 1.11.2 and 1.12.1
|
|
||||||
# 1.13 is required for parallel tests
|
|
||||||
AM_INIT_AUTOMAKE([1.13 foreign dist-xz color-tests silent-rules subdir-objects])
|
|
||||||
# The following line causes --disable-maintainer-mode to be the default to
|
|
||||||
# configure. This is necessary because libpng distributions cannot rely on the
|
|
||||||
# time stamps of the autotools generated files being correct
|
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
dnl configure.ac and Makefile.am expect automake 1.11.2 or a compatible later
|
PNGLIB_VERSION=1.5.29
|
||||||
dnl version; aclocal.m4 will generate a failure if you use a prior version of
|
|
||||||
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.51.git
|
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=6
|
PNGLIB_MINOR=5
|
||||||
PNGLIB_RELEASE=51
|
PNGLIB_RELEASE=29
|
||||||
|
|
||||||
dnl End of version number stuff
|
dnl End of version number stuff
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([pngget.c])
|
AC_CONFIG_SRCDIR([pngget.c])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
# Check the basic programs.
|
# Checks for programs.
|
||||||
AC_LANG([C])
|
AC_LANG([C])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
LT_PATH_LD
|
AC_PROG_LD
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
|
AC_PROG_SED
|
||||||
AC_PROG_AWK
|
AC_PROG_AWK
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
|
|
||||||
dnl libtool/libtoolize; version 2.4.2 is the tested version. This or any
|
|
||||||
dnl compatible later version may be used
|
|
||||||
LT_INIT([win32-dll])
|
LT_INIT([win32-dll])
|
||||||
LT_PREREQ([2.4.2])
|
|
||||||
|
|
||||||
dnl Declare the AWK variable.
|
# Checks for header files.
|
||||||
AC_ARG_VAR(AWK, [AWK language processor])
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
|
||||||
|
|
||||||
# Some awk implementations crash when confronted with pnglibconf.dfa.
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
# Run a test now, to make sure this doesn't happen.
|
AC_C_CONST
|
||||||
AC_MSG_CHECKING([if awk ($AWK) works])
|
AC_TYPE_SIZE_T
|
||||||
if ${AWK} -f ${srcdir}/scripts/options.awk out="/dev/null" version=search\
|
AC_STRUCT_TM
|
||||||
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
AC_C_RESTRICT
|
||||||
${srcdir}/pngusr.dfa 1>&2
|
|
||||||
then
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
else
|
|
||||||
AC_MSG_FAILURE([no], 1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# This is a remnant of the old cc -E validation, where it may have been
|
# This is a remnant of the old cc -E validation, where it may have been
|
||||||
# necessary to use a different preprocessor for .dfn files
|
# necessary to use a different preprocessor for .dfn files
|
||||||
DFNCPP="$CPP"
|
DFNCPP="$CPP"
|
||||||
AC_SUBST(DFNCPP)
|
AC_SUBST(DFNCPP)
|
||||||
|
|
||||||
AC_ARG_ENABLE([tests],
|
|
||||||
AS_HELP_STRING([--disable-tests],
|
|
||||||
[do not build the test programs (default is to build)]),
|
|
||||||
[enable_tests="$enableval"],
|
|
||||||
[enable_tests=yes])
|
|
||||||
|
|
||||||
AM_CONDITIONAL([ENABLE_TESTS],
|
|
||||||
[test "$enable_tests" != "no"])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([tools],
|
|
||||||
AS_HELP_STRING([--disable-tools],
|
|
||||||
[do not build the auxiliary tools (default is to build)]),
|
|
||||||
[enable_tools="$enableval"],
|
|
||||||
[enable_tools=yes])
|
|
||||||
|
|
||||||
AM_CONDITIONAL([ENABLE_TOOLS],
|
|
||||||
[test "$enable_tools" != "no"])
|
|
||||||
|
|
||||||
# -Werror cannot be passed to GCC in CFLAGS because configure will fail
|
|
||||||
# (it checks the compiler with a program that generates a warning).
|
|
||||||
# Add the following option to deal with this:
|
|
||||||
AC_ARG_VAR(PNG_COPTS,
|
|
||||||
[additional flags for the C compiler, to be used for options that would]
|
|
||||||
[cause configure itself to fail])
|
|
||||||
AC_ARG_ENABLE(werror,
|
|
||||||
AS_HELP_STRING([[[--enable-werror[=OPT]]]],
|
|
||||||
[Pass -Werror or the given argument to the compiler if it is supported]),
|
|
||||||
[test "$enable_werror" = "yes" && enable_werror="-Werror"
|
|
||||||
if test "$enable_werror" != "no"; then
|
|
||||||
sav_CFLAGS="$CFLAGS"
|
|
||||||
CFLAGS="$enable_werror $CFLAGS"
|
|
||||||
AC_MSG_CHECKING([if the compiler allows $enable_werror])
|
|
||||||
AC_COMPILE_IFELSE(
|
|
||||||
[AC_LANG_SOURCE([
|
|
||||||
[int main(int argc, char **argv){]
|
|
||||||
[return argv[argc-1][0];]
|
|
||||||
[}]])],
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
PNG_COPTS="$PNG_COPTS $enable_werror",
|
|
||||||
AC_MSG_RESULT(no))
|
|
||||||
CFLAGS="$sav_CFLAGS"
|
|
||||||
fi],)
|
|
||||||
|
|
||||||
# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89.
|
|
||||||
# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining
|
|
||||||
# _POSIX_SOURCE to 1. This is incompatible with the new default mode, so
|
|
||||||
# we test for that and force the "-std=c89" compiler option:
|
|
||||||
AC_MSG_CHECKING([if we need to force back C standard to C89])
|
|
||||||
AC_COMPILE_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM([
|
|
||||||
[#define _POSIX_SOURCE 1]
|
|
||||||
[#include <stdio.h>]
|
|
||||||
])],
|
|
||||||
AC_MSG_RESULT(no),[
|
|
||||||
if test "x$GCC" != "xyes"; then
|
|
||||||
AC_MSG_ERROR(
|
|
||||||
[Forcing back to C89 is required but the flags are only known for GCC])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
CFLAGS="$CFLAGS -std=c89"
|
|
||||||
])
|
|
||||||
|
|
||||||
# Checks for structures and compiler characteristics.
|
|
||||||
AC_STRUCT_TM
|
|
||||||
AC_C_RESTRICT
|
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_CHECK_FUNCS([pow], ,
|
AC_FUNC_STRTOD
|
||||||
[AC_CHECK_LIB([m], [pow], , [AC_MSG_ERROR([cannot find pow])])])
|
AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
|
||||||
|
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
|
||||||
# Some later POSIX 1003.1 functions are required for test programs, failure
|
|
||||||
# here is soft (the corresponding test program is not built).
|
|
||||||
AC_CHECK_FUNC([clock_gettime], , [AC_MSG_WARN([not building timepng])])
|
|
||||||
AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "$ac_cv_func_clock_gettime" = "yes"])
|
|
||||||
|
|
||||||
AC_ARG_WITH(zlib-prefix,
|
AC_ARG_WITH(zlib-prefix,
|
||||||
AS_HELP_STRING([[[--with-zlib-prefix]]],
|
AC_HELP_STRING([--with-zlib-prefix],
|
||||||
[prefix that may have been used in installed zlib]),
|
[prefix that may have been used in installed zlib]),
|
||||||
[ZPREFIX=${withval}],
|
[ZPREFIX=${withval}],
|
||||||
[ZPREFIX='z_'])
|
[ZPREFIX='z_'])
|
||||||
AC_CHECK_LIB([z], [zlibVersion], ,
|
AC_CHECK_LIB(z, zlibVersion, ,
|
||||||
[AC_CHECK_LIB([z], [${ZPREFIX}zlibVersion], ,
|
AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, ,
|
||||||
[AC_MSG_ERROR([zlib not installed])])])
|
AC_ERROR([zlib not installed])))
|
||||||
|
|
||||||
# The following is for pngvalid, to ensure it catches FP errors even on
|
# The following is for pngvalid, to ensure it catches FP errors even on
|
||||||
# platforms that don't enable FP exceptions, the function appears in the math
|
# platforms that don't enable FP exceptions, the function appears in the math
|
||||||
@ -182,6 +80,10 @@ AC_CHECK_LIB([z], [zlibVersion], ,
|
|||||||
AC_CHECK_LIB([m], [feenableexcept])
|
AC_CHECK_LIB([m], [feenableexcept])
|
||||||
AC_CHECK_FUNCS([feenableexcept])
|
AC_CHECK_FUNCS([feenableexcept])
|
||||||
|
|
||||||
|
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
|
||||||
|
LIBPNG_DEFINES=$LIBPNG_DEFINES
|
||||||
|
AC_SUBST(LIBPNG_DEFINES)
|
||||||
|
|
||||||
AC_MSG_CHECKING([if using Solaris linker])
|
AC_MSG_CHECKING([if using Solaris linker])
|
||||||
SLD=`$LD --version 2>&1 | grep Solaris`
|
SLD=`$LD --version 2>&1 | grep Solaris`
|
||||||
if test "$SLD"; then
|
if test "$SLD"; then
|
||||||
@ -226,9 +128,9 @@ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
|
|||||||
if test "$have_ld_version_script" = "yes"; then
|
if test "$have_ld_version_script" = "yes"; then
|
||||||
AC_MSG_CHECKING([for symbol prefix])
|
AC_MSG_CHECKING([for symbol prefix])
|
||||||
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
|
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
|
||||||
| ${CPP:-${CC:-gcc} -E} - 2>&1 \
|
| ${DFNCPP-${CC-gcc} -E} - 2>&1 \
|
||||||
| ${EGREP:-grep} "^PREFIX=" \
|
| ${EGREP-grep} "^PREFIX=" \
|
||||||
| ${SED:-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
|
| ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
|
||||||
AC_SUBST(SYMBOL_PREFIX)
|
AC_SUBST(SYMBOL_PREFIX)
|
||||||
AC_MSG_RESULT($SYMBOL_PREFIX)
|
AC_MSG_RESULT($SYMBOL_PREFIX)
|
||||||
fi
|
fi
|
||||||
@ -242,38 +144,28 @@ AC_SUBST(PNGLIB_RELEASE)
|
|||||||
# Additional arguments (and substitutions)
|
# Additional arguments (and substitutions)
|
||||||
# Allow the pkg-config directory to be set
|
# Allow the pkg-config directory to be set
|
||||||
AC_ARG_WITH(pkgconfigdir,
|
AC_ARG_WITH(pkgconfigdir,
|
||||||
AS_HELP_STRING([[[--with-pkgconfigdir]]],
|
AC_HELP_STRING([--with-pkgconfigdir],
|
||||||
[Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
|
[Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
|
||||||
[pkgconfigdir=${withval}],
|
[pkgconfigdir=${withval}],
|
||||||
[pkgconfigdir='${libdir}/pkgconfig'])
|
[pkgconfigdir='${libdir}/pkgconfig'])
|
||||||
|
|
||||||
AC_SUBST([pkgconfigdir])
|
AC_SUBST([pkgconfigdir])
|
||||||
AC_MSG_NOTICE([[pkgconfig directory is ${pkgconfigdir}]])
|
AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
|
||||||
|
|
||||||
# Make the *-config binary config scripts optional
|
# Make the *-config binary config scripts optional
|
||||||
AC_ARG_WITH(binconfigs,
|
AC_ARG_WITH(binconfigs,
|
||||||
AS_HELP_STRING([[[--with-binconfigs]]],
|
AC_HELP_STRING([--with-binconfigs],
|
||||||
[Generate shell libpng-config scripts as well as pkg-config data]
|
[Generate shell libpng-config scripts as well as pkg-config data]
|
||||||
[@<:@default=yes@:>@]),
|
[@<:@default=yes@:>@]),
|
||||||
[if test "${withval}" = no; then
|
[if test "${withval}" = no; then
|
||||||
binconfigs=
|
binconfigs=
|
||||||
AC_MSG_NOTICE([[libpng-config scripts will not be built]])
|
AC_MSG_NOTICE([libpng-config scripts will not be built])
|
||||||
else
|
else
|
||||||
binconfigs='${binconfigs}'
|
binconfigs='${binconfigs}'
|
||||||
fi],
|
fi],
|
||||||
[binconfigs='${binconfigs}'])
|
[binconfigs='${binconfigs}'])
|
||||||
AC_SUBST([binconfigs])
|
AC_SUBST([binconfigs])
|
||||||
|
|
||||||
# Support for prefixes to the API function names; this will generate defines
|
|
||||||
# at the start of the build to rename exported library functions
|
|
||||||
AC_ARG_WITH(libpng-prefix,
|
|
||||||
AS_HELP_STRING([[[--with-libpng-prefix]]],
|
|
||||||
[prefix libpng exported function (API) names with the given value]),
|
|
||||||
[if test "${withval:-no}" != "no"; then
|
|
||||||
AC_SUBST([PNG_PREFIX], [${withval}])
|
|
||||||
fi])
|
|
||||||
AM_CONDITIONAL([DO_PNG_PREFIX], [test "${with_libpng_prefix:-no}" != "no"])
|
|
||||||
|
|
||||||
# Control over what links are made for installed files. Versioned files are
|
# Control over what links are made for installed files. Versioned files are
|
||||||
# always installed, when the following options are turned on corresponding
|
# always installed, when the following options are turned on corresponding
|
||||||
# unversioned links are also created (normally as symbolic links):
|
# unversioned links are also created (normally as symbolic links):
|
||||||
@ -313,90 +205,20 @@ AC_ARG_ENABLE([unversioned-libpng-config],
|
|||||||
AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG],
|
AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG],
|
||||||
[test "$enable_unversioned_libpng_config" != "no"])
|
[test "$enable_unversioned_libpng_config" != "no"])
|
||||||
|
|
||||||
# HOST-SPECIFIC OPTIONS
|
# HOST SPECIFIC OPTIONS
|
||||||
# =====================
|
# =====================
|
||||||
#
|
#
|
||||||
# DEFAULT
|
# ARM
|
||||||
# =======
|
# ===
|
||||||
#
|
#
|
||||||
AC_ARG_ENABLE([hardware-optimizations],
|
# ARM NEON (SIMD) support.
|
||||||
AS_HELP_STRING([[[--enable-hardware-optimizations]]],
|
|
||||||
[Enable hardware optimizations: =no/off, yes/on.]),
|
|
||||||
[case "$enableval" in
|
|
||||||
no|off)
|
|
||||||
# disable hardware optimization on all systems:
|
|
||||||
enable_arm_neon=no
|
|
||||||
AC_DEFINE([PNG_ARM_NEON_OPT], [0],
|
|
||||||
[Disable ARM_NEON optimizations])
|
|
||||||
enable_mips_msa=no
|
|
||||||
AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
|
|
||||||
[Disable MIPS_MSA optimizations])
|
|
||||||
enable_mips_mmi=no
|
|
||||||
AC_DEFINE([PNG_MIPS_MMI_OPT], [0],
|
|
||||||
[Disable MIPS_MMI optimizations])
|
|
||||||
enable_powerpc_vsx=no
|
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
|
|
||||||
[Disable POWERPC VSX optimizations])
|
|
||||||
enable_intel_sse=no
|
|
||||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [0],
|
|
||||||
[Disable INTEL_SSE 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:
|
|
||||||
case "$host_cpu" in
|
|
||||||
arm*|aarch64*)
|
|
||||||
enable_arm_neon=yes
|
|
||||||
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
|
|
||||||
[Enable ARM_NEON optimizations])
|
|
||||||
;;
|
|
||||||
mipsel*|mips64el*)
|
|
||||||
enable_mips_mmi=yes
|
|
||||||
enable_mips_msa=yes
|
|
||||||
AC_DEFINE([PNG_MIPS_MMI_OPT], [1],
|
|
||||||
[Enable MIPS_MMI optimizations])
|
|
||||||
AC_DEFINE([PNG_MIPS_MSA_OPT], [2],
|
|
||||||
[Enable MIPS_MSA optimizations])
|
|
||||||
;;
|
|
||||||
i?86|x86_64)
|
|
||||||
enable_intel_sse=yes
|
|
||||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [1],
|
|
||||||
[Enable Intel SSE optimizations])
|
|
||||||
;;
|
|
||||||
powerpc*|ppc64*)
|
|
||||||
enable_powerpc_vsx=yes
|
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
|
|
||||||
[Enable POWERPC VSX optimizations])
|
|
||||||
;;
|
|
||||||
loongarch*)
|
|
||||||
enable_loongarch_lsx=yes
|
|
||||||
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])
|
|
||||||
|
|
||||||
# ARM NEON
|
|
||||||
# ========
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([arm-neon],
|
AC_ARG_ENABLE([arm-neon],
|
||||||
AS_HELP_STRING([[[--enable-arm-neon]]],
|
AS_HELP_STRING([[[--enable-arm-neon]]],
|
||||||
[Enable ARM NEON optimizations: =no/off, check, api, yes/on.]
|
[Enable ARM NEON optimizations: =no/off, check, api, yes/on:]
|
||||||
[no/off: disable the optimizations;]
|
[no/off: disable the optimizations; check: use internal checking code]
|
||||||
[check: use internal checking code (deprecated and poorly supported);]
|
[(deprecated and poorly supported); api: disable by default, enable by]
|
||||||
[api: disable by default, enable by a call to png_set_option;]
|
[a call to png_set_option; yes/on: turn on unconditionally.]
|
||||||
[yes/on: turn on unconditionally.]
|
|
||||||
[If not specified: determined by the compiler.]),
|
[If not specified: determined by the compiler.]),
|
||||||
[case "$enableval" in
|
[case "$enableval" in
|
||||||
no|off)
|
no|off)
|
||||||
@ -404,7 +226,7 @@ AC_ARG_ENABLE([arm-neon],
|
|||||||
AC_DEFINE([PNG_ARM_NEON_OPT], [0],
|
AC_DEFINE([PNG_ARM_NEON_OPT], [0],
|
||||||
[Disable ARM Neon optimizations])
|
[Disable ARM Neon optimizations])
|
||||||
# Prevent inclusion of the assembler files below:
|
# Prevent inclusion of the assembler files below:
|
||||||
enable_arm_neon=no ;;
|
enable_arm_neon=no;;
|
||||||
check)
|
check)
|
||||||
AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
|
AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
|
||||||
[Check for ARM Neon support at run-time]);;
|
[Check for ARM Neon support at run-time]);;
|
||||||
@ -414,336 +236,29 @@ AC_ARG_ENABLE([arm-neon],
|
|||||||
yes|on)
|
yes|on)
|
||||||
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
|
AC_DEFINE([PNG_ARM_NEON_OPT], [2],
|
||||||
[Enable ARM Neon optimizations])
|
[Enable ARM Neon optimizations])
|
||||||
AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';]
|
AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
|
||||||
[if you want the optimizations unconditionally,]
|
[you want the optimizations unconditionally pass -mfpu=neon]
|
||||||
[pass '-mfpu=neon' to the compiler.]);;
|
[to the compiler.]);;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}:]
|
AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value])
|
||||||
[invalid argument])
|
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# Add ARM-specific files to all builds where $host_cpu is arm ('arm*') or
|
# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or
|
||||||
# where ARM optimizations were explicitly requested. (This allows a fallback
|
# where ARM optimizations were explicitly requested (this allows a fallback if a
|
||||||
# if a future host CPU does not match 'arm*'.)
|
# future host CPU does not match 'arm*')
|
||||||
|
|
||||||
AM_CONDITIONAL([PNG_ARM_NEON],
|
AM_CONDITIONAL([PNG_ARM_NEON],
|
||||||
[test "$enable_arm_neon" != 'no' &&
|
[test "$enable_arm_neon" != 'no' &&
|
||||||
case "$host_cpu" in
|
case "$host_cpu" in
|
||||||
arm*|aarch64*) : ;;
|
arm*) :;;
|
||||||
*) test "$enable_arm_neon" != '' ;;
|
*) test "$enable_arm_neon" != '';;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
# MIPS MSA
|
|
||||||
# ========
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([mips-msa],
|
|
||||||
AS_HELP_STRING([[[--enable-mips-msa]]],
|
|
||||||
[Enable MIPS MSA optimizations: =no/off, check, api, yes/on.]
|
|
||||||
[no/off: disable the optimizations;]
|
|
||||||
[check: use internal checking code (deprecated and poorly supported);]
|
|
||||||
[api: disable by default, enable by a call to png_set_option;]
|
|
||||||
[yes/on: turn on unconditionally.]
|
|
||||||
[If not specified: determined by the compiler.]),
|
|
||||||
[case "$enableval" in
|
|
||||||
no|off)
|
|
||||||
# disable the default enabling on __mips_msa systems:
|
|
||||||
AC_DEFINE([PNG_MIPS_MSA_OPT], [0],
|
|
||||||
[Disable MIPS MSA optimizations])
|
|
||||||
# Prevent inclusion of the assembler files below:
|
|
||||||
enable_mips_msa=no ;;
|
|
||||||
check)
|
|
||||||
AC_DEFINE([PNG_MIPS_MSA_CHECK_SUPPORTED], [],
|
|
||||||
[Check for MIPS MSA support at run-time]);;
|
|
||||||
api)
|
|
||||||
AC_DEFINE([PNG_MIPS_MSA_API_SUPPORTED], [],
|
|
||||||
[Turn on MIPS MSA optimizations at run-time]);;
|
|
||||||
yes|on)
|
|
||||||
AC_DEFINE([PNG_MIPS_MSA_OPT], [2],
|
|
||||||
[Enable MIPS MSA optimizations])
|
|
||||||
AC_MSG_WARN([--enable-mips-msa: please specify 'check' or 'api';]
|
|
||||||
[if you want the optimizations unconditionally,]
|
|
||||||
[pass '-mmsa -mfp64' to the compiler.]);;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([--enable-mips-msa=${enable_mips_msa}:]
|
|
||||||
[invalid argument])
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# Add MIPS-specific files to all builds where $host_cpu is mips ('mips*') or
|
|
||||||
# where MIPS optimizations were explicitly requested. (This allows a fallback
|
|
||||||
# if a future host CPU does not match 'mips*'.)
|
|
||||||
|
|
||||||
AM_CONDITIONAL([PNG_MIPS_MSA],
|
|
||||||
[test "$enable_mips_msa" != 'no' &&
|
|
||||||
case "$host_cpu" in
|
|
||||||
mipsel*|mips64el*) : ;;
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# MIPS MMI
|
|
||||||
# ========
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([mips-mmi],
|
|
||||||
AS_HELP_STRING([[[--enable-mips-mmi]]],
|
|
||||||
[Enable MIPS MMI optimizations: =no/off, check, api, yes/on.]
|
|
||||||
[no/off: disable the optimizations;]
|
|
||||||
[check: use internal checking code (deprecated and poorly supported);]
|
|
||||||
[api: disable by default, enable by a call to png_set_option;]
|
|
||||||
[yes/on: turn on unconditionally.]
|
|
||||||
[If not specified: determined by the compiler.]),
|
|
||||||
[case "$enableval" in
|
|
||||||
no|off)
|
|
||||||
# disable the default enabling on __mips_mmi systems:
|
|
||||||
AC_DEFINE([PNG_MIPS_MMI_OPT], [0],
|
|
||||||
[Disable MIPS MMI optimizations])
|
|
||||||
# Prevent inclusion of the assembler files below:
|
|
||||||
enable_mips_mmi=no;;
|
|
||||||
check)
|
|
||||||
AC_DEFINE([PNG_MIPS_MMI_CHECK_SUPPORTED], [],
|
|
||||||
[Check for MIPS MMI support at run-time]);;
|
|
||||||
api)
|
|
||||||
AC_DEFINE([PNG_MIPS_MMI_API_SUPPORTED], [],
|
|
||||||
[Turn on MIPS MMI optimizations at run-time]);;
|
|
||||||
yes|on)
|
|
||||||
AC_DEFINE([PNG_MIPS_MMI_OPT], [1],
|
|
||||||
[Enable MIPS MMI optimizations])
|
|
||||||
AC_MSG_WARN([--enable-mips-mmi: please specify 'check' or 'api';]
|
|
||||||
[if you want the optimizations unconditionally]
|
|
||||||
[pass '-mloongson-mmi -march=loongson3a' to the compiler.]);;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([--enable-mips-mmi=${enable_mips_mmi}:]
|
|
||||||
[invalid argument])
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# Add MIPS specific files to all builds where the host_cpu is mips ('mips*') or
|
|
||||||
# where MIPS optimizations were explicitly requested. (This allows a fallback
|
|
||||||
# if a future host CPU does not match 'mips*'.)
|
|
||||||
|
|
||||||
AM_CONDITIONAL([PNG_MIPS_MMI],
|
|
||||||
[test "$enable_mips_mmi" != 'no' &&
|
|
||||||
case "$host_cpu" in
|
|
||||||
mipsel*|mips64el*) : ;;
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# INTEL SSE
|
|
||||||
# =========
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([intel-sse],
|
|
||||||
AS_HELP_STRING([[[--enable-intel-sse]]],
|
|
||||||
[Enable Intel SSE optimizations: =no/off, yes/on.]
|
|
||||||
[no/off: disable the optimizations;]
|
|
||||||
[yes/on: enable the optimizations.]
|
|
||||||
[If not specified: determined by the compiler.]),
|
|
||||||
[case "$enableval" in
|
|
||||||
no|off)
|
|
||||||
# disable the default enabling:
|
|
||||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [0],
|
|
||||||
[Disable Intel SSE optimizations])
|
|
||||||
# Prevent inclusion of the assembler files below:
|
|
||||||
enable_intel_sse=no ;;
|
|
||||||
yes|on)
|
|
||||||
AC_DEFINE([PNG_INTEL_SSE_OPT], [1],
|
|
||||||
[Enable Intel SSE optimizations]);;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}:]
|
|
||||||
[invalid argument])
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# Add Intel-specific files to all builds where $host_cpu is Intel ('x86*') or
|
|
||||||
# where Intel optimizations were explicitly requested. (This allows a fallback
|
|
||||||
# if a future host CPU does not match 'x86*'.)
|
|
||||||
AM_CONDITIONAL([PNG_INTEL_SSE],
|
|
||||||
[test "$enable_intel_sse" != 'no' &&
|
|
||||||
case "$host_cpu" in
|
|
||||||
i?86|x86_64) : ;;
|
|
||||||
*) test "$enable_intel_sse" != '' ;;
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# POWERPC VSX
|
|
||||||
# ===========
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([powerpc-vsx],
|
|
||||||
AS_HELP_STRING([[[--enable-powerpc-vsx]]],
|
|
||||||
[Enable POWERPC VSX optimizations: =no/off, check, api, yes/on.]
|
|
||||||
[no/off: disable the optimizations;]
|
|
||||||
[check: use internal checking code;]
|
|
||||||
[api: disable by default, enable by a call to png_set_option;]
|
|
||||||
[yes/on: turn on unconditionally.]
|
|
||||||
[If not specified: determined by the compiler.]),
|
|
||||||
[case "$enableval" in
|
|
||||||
no|off)
|
|
||||||
# disable the default enabling on __ppc64__ systems:
|
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_OPT], [0],
|
|
||||||
[Disable POWERPC VSX optimizations])
|
|
||||||
# Prevent inclusion of the platform-specific files below:
|
|
||||||
enable_powerpc_vsx=no ;;
|
|
||||||
check)
|
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [],
|
|
||||||
[Check for POWERPC VSX support at run-time])
|
|
||||||
AC_MSG_WARN([--enable-powerpc-vsx: please see contrib/powerpc/README]
|
|
||||||
[for the list of supported systems.]);;
|
|
||||||
api)
|
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_API_SUPPORTED], [],
|
|
||||||
[Turn on POWERPC VSX optimizations at run-time]);;
|
|
||||||
yes|on)
|
|
||||||
AC_DEFINE([PNG_POWERPC_VSX_OPT], [2],
|
|
||||||
[Enable POWERPC VSX optimizations])
|
|
||||||
AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api';]
|
|
||||||
[if you want the optimizations unconditionally,]
|
|
||||||
[pass '-maltivec -mvsx' or '-mcpu=power8' to the compiler.]);;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}:]
|
|
||||||
[invalid argument])
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# Add PowerPC-specific files to all builds where $host_cpu is powerpc
|
|
||||||
# ('powerpc*') or where PowerPC optimizations were explicitly requested.
|
|
||||||
# (This allows a fallback if a future host CPU does not match 'powerpc*'.)
|
|
||||||
|
|
||||||
AM_CONDITIONAL([PNG_POWERPC_VSX],
|
|
||||||
[test "$enable_powerpc_vsx" != 'no' &&
|
|
||||||
case "$host_cpu" in
|
|
||||||
powerpc*|ppc64*) : ;;
|
|
||||||
esac])
|
|
||||||
|
|
||||||
# LOONGARCH LSX
|
|
||||||
# =============
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([loongarch-lsx],
|
|
||||||
AS_HELP_STRING([[[--enable-loongarch-lsx]]],
|
|
||||||
[Enable LOONGARCH LSX optimizations: =no/off, yes/on:]
|
|
||||||
[no/off: disable the optimizations;]
|
|
||||||
[yes/on: turn on unconditionally.]
|
|
||||||
[If not specified: determined by the compiler.]),
|
|
||||||
[case "$enableval" in
|
|
||||||
no|off)
|
|
||||||
# disable the default enabling on __loongarch_simd systems:
|
|
||||||
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [0],
|
|
||||||
[Disable LOONGARCH LSX optimizations])
|
|
||||||
# Prevent inclusion of the assembler files below:
|
|
||||||
enable_loongarch_lsx=no;;
|
|
||||||
yes|on)
|
|
||||||
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
|
|
||||||
[Enable LOONGARCH LSX optimizations])
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR([--enable-loongarch-lsx=${enable_loongarch_lsx}:]
|
|
||||||
[invalid argument])
|
|
||||||
esac])
|
|
||||||
|
|
||||||
if test "$enable_loongarch_lsx" != "no" &&
|
|
||||||
case "$host_cpu" in
|
|
||||||
loongarch*) : ;;
|
|
||||||
*) test "$enable_loongarch_lsx" != '' ;;
|
|
||||||
esac
|
|
||||||
then
|
|
||||||
compiler_support_loongarch_lsx=no
|
|
||||||
AC_MSG_CHECKING(whether to use LoongArch LSX intrinsics)
|
|
||||||
save_CFLAGS="$CFLAGS"
|
|
||||||
LSX_CFLAGS="${LSX_CFLAGS:-"-mlsx"}"
|
|
||||||
CFLAGS="$CFLAGS $LSX_CFLAGS"
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
||||||
#include <lsxintrin.h>
|
|
||||||
int main(){
|
|
||||||
__m128i a, b, c;
|
|
||||||
a = __lsx_vadd_w(b, c);
|
|
||||||
return 0;
|
|
||||||
}]])],compiler_support_loongarch_lsx=yes)
|
|
||||||
CFLAGS="$save_CFLAGS"
|
|
||||||
AC_MSG_RESULT($compiler_support_loongarch_lsx)
|
|
||||||
if test "$compiler_support_loongarch_lsx" = "yes"; then
|
|
||||||
AC_DEFINE([PNG_LOONGARCH_LSX_OPT], [1],
|
|
||||||
[Enable LOONGARCH LSX optimizations])
|
|
||||||
else
|
|
||||||
AC_MSG_WARN([Compiler does not support loongarch LSX.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add LoongArch specific files to all builds where the host_cpu is loongarch
|
|
||||||
# ('loongarch*') or where LoongArch optimizations were explicitly requested.
|
|
||||||
# (This allows a fallback if a future host CPU does not match 'loongarch*'.)
|
|
||||||
|
|
||||||
AM_CONDITIONAL([PNG_LOONGARCH_LSX],
|
|
||||||
[test "$enable_loongarch_lsx" != "no" &&
|
|
||||||
test "$compiler_support_loongarch_lsx" = "yes" &&
|
|
||||||
case "$host_cpu" in
|
|
||||||
loongarch*) : ;;
|
|
||||||
*) 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]])
|
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
|
||||||
|
|
||||||
# Config files, substituting as above
|
# Config files, substituting as above
|
||||||
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
|
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
|
||||||
AC_CONFIG_FILES([libpng-config:libpng-config.in],
|
AC_CONFIG_FILES([libpng-config:libpng-config.in],
|
||||||
[chmod +x libpng-config])
|
[chmod +x libpng-config])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# https://editorconfig.org
|
|
||||||
|
|
||||||
root = false
|
|
||||||
|
|
||||||
[*.[ch]]
|
|
||||||
indent_size = unset
|
|
||||||
indent_style = unset
|
|
||||||
max_doc_length = unset
|
|
||||||
max_line_length = unset
|
|
@ -1,7 +1,4 @@
|
|||||||
External contributions to libpng
|
|
||||||
--------------------------------
|
|
||||||
|
|
||||||
This "contrib" directory contains contributions which are not necessarily under
|
This "contrib" directory contains contributions which are not necessarily under
|
||||||
the libpng license, although all are open source. They are not part of
|
the libpng license, although all are open source. They are not part of
|
||||||
libpng proper and are not used for building the library, although some are used
|
libpng proper and are not used for building the library.
|
||||||
for testing the library via "make check".
|
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
OPERATING SYSTEM SPECIFIC ARM NEON DETECTION
|
|
||||||
--------------------------------------------
|
|
||||||
|
|
||||||
Detection of the ability to execute ARM NEON on an ARM processor requires
|
|
||||||
operating system support. (The information is not available in user mode.)
|
|
||||||
|
|
||||||
HOW TO USE THIS
|
|
||||||
---------------
|
|
||||||
|
|
||||||
This directory contains C code fragments that can be included in arm/arm_init.c
|
|
||||||
by setting the macro PNG_ARM_NEON_FILE to the file name in "" or <> at build
|
|
||||||
time. This setting is not recorded in pnglibconf.h and can be changed simply by
|
|
||||||
rebuilding arm/arm_init.o with the required macro definition.
|
|
||||||
|
|
||||||
For any of this code to be used the ARM NEON code must be enabled and run time
|
|
||||||
checks must be supported. I.e.:
|
|
||||||
|
|
||||||
#if PNG_ARM_NEON_OPT > 0
|
|
||||||
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED
|
|
||||||
|
|
||||||
This is done in a 'configure' build by passing configure the argument:
|
|
||||||
|
|
||||||
--enable-arm-neon=check
|
|
||||||
|
|
||||||
Apart from the basic Linux implementation in contrib/arm-neon/linux.c this code
|
|
||||||
is unsupported. That means that it is not even compiled on a regular basis and
|
|
||||||
may be broken in any given minor release.
|
|
||||||
|
|
||||||
FILE FORMAT
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Each file documents its testing status as of the last time it was tested (which
|
|
||||||
may have been a long time ago):
|
|
||||||
|
|
||||||
STATUS: one of:
|
|
||||||
SUPPORTED: This indicates that the file is included in the regularly
|
|
||||||
performed test builds and bugs are fixed when discovered.
|
|
||||||
COMPILED: This indicates that the code did compile at least once. See the
|
|
||||||
more detailed description for the extent to which the result was
|
|
||||||
successful.
|
|
||||||
TESTED: This means the code was fully compiled into the libpng test programs
|
|
||||||
and these were run at least once.
|
|
||||||
|
|
||||||
BUG REPORTS: an email address to which to send reports of problems
|
|
||||||
|
|
||||||
The file is a fragment of C code. It should not define any 'extern' symbols;
|
|
||||||
everything should be static. It must define the function:
|
|
||||||
|
|
||||||
static int png_have_neon(png_structp png_ptr);
|
|
||||||
|
|
||||||
That function must return 1 if ARM NEON instructions are supported, 0 if not.
|
|
||||||
It must not execute png_error unless it detects a bug. A png_error will prevent
|
|
||||||
the reading of the PNG and in the future, writing too.
|
|
||||||
|
|
||||||
BUG REPORTS
|
|
||||||
-----------
|
|
||||||
|
|
||||||
If you mail a bug report for any file that is not SUPPORTED there may only be
|
|
||||||
limited response. Consider fixing it and sending a patch to fix the problem -
|
|
||||||
this is more likely to result in action.
|
|
||||||
|
|
||||||
CONTRIBUTIONS
|
|
||||||
-------------
|
|
||||||
|
|
||||||
You may send contributions of new implementations to
|
|
||||||
png-mng-implement@sourceforge.net. Please write code in strict C90 C where
|
|
||||||
possible. Obviously OS dependencies are to be expected. If you submit code you
|
|
||||||
must have the authors permission and it must have a license that is acceptable
|
|
||||||
to the current maintainer; in particular that license must permit modification
|
|
||||||
and redistribution.
|
|
||||||
|
|
||||||
Please try to make the contribution a single file and give the file a clear and
|
|
||||||
unambiguous name that identifies the target OS. If multiple files really are
|
|
||||||
required put them all in a sub-directory.
|
|
||||||
|
|
||||||
You must also be prepared to handle bug reports from users of the code, either
|
|
||||||
by joining the png-mng-implement mailing list or by providing an email for the
|
|
||||||
"BUG REPORTS" entry or both. Please make sure that the header of the file
|
|
||||||
contains the STATUS and BUG REPORTS fields as above.
|
|
||||||
|
|
||||||
Please list the OS requirements as precisely as possible. Ideally you should
|
|
||||||
also list the environment in which the code has been tested and certainly list
|
|
||||||
any environments where you suspect it might not work.
|
|
@ -1,39 +0,0 @@
|
|||||||
/* contrib/arm-neon/android-ndk.c
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014 Glenn Randers-Pehrson
|
|
||||||
* Written by John Bowler, 2014.
|
|
||||||
*
|
|
||||||
* This code is released under the libpng license.
|
|
||||||
* For conditions of distribution and use, see the disclaimer
|
|
||||||
* and license in png.h
|
|
||||||
*
|
|
||||||
* SEE contrib/arm-neon/README before reporting bugs
|
|
||||||
*
|
|
||||||
* STATUS: COMPILED, UNTESTED
|
|
||||||
* BUG REPORTS: png-mng-implement@sourceforge.net
|
|
||||||
*
|
|
||||||
* png_have_neon implemented for the Android NDK, see:
|
|
||||||
*
|
|
||||||
* Documentation:
|
|
||||||
* http://www.kandroid.org/ndk/docs/CPU-ARM-NEON.html
|
|
||||||
* https://code.google.com/p/android/issues/detail?id=49065
|
|
||||||
*
|
|
||||||
* NOTE: this requires that libpng is built against the Android NDK and linked
|
|
||||||
* with an implementation of the Android ARM 'cpu-features' library. The code
|
|
||||||
* has been compiled only, not linked: no version of the library has been found,
|
|
||||||
* only the header files exist in the NDK.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <cpu-features.h>
|
|
||||||
|
|
||||||
static int
|
|
||||||
png_have_neon(png_structp png_ptr)
|
|
||||||
{
|
|
||||||
/* This is a whole lot easier than the linux code, however it is probably
|
|
||||||
* implemented as below, therefore it is better to cache the result (these
|
|
||||||
* function calls may be slow!)
|
|
||||||
*/
|
|
||||||
PNG_UNUSED(png_ptr)
|
|
||||||
return android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM &&
|
|
||||||
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
|
|
||||||
}
|
|
@ -1,120 +0,0 @@
|
|||||||
/* contrib/arm-neon/linux-auxv.c
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014 Glenn Randers-Pehrson
|
|
||||||
* Written by Mans Rullgard, 2011.
|
|
||||||
*
|
|
||||||
* This code is released under the libpng license.
|
|
||||||
* For conditions of distribution and use, see the disclaimer
|
|
||||||
* and license in png.h
|
|
||||||
*
|
|
||||||
* SEE contrib/arm-neon/README before reporting bugs
|
|
||||||
*
|
|
||||||
* STATUS: COMPILED, TESTED
|
|
||||||
* BUG REPORTS: png-mng-implement@sourceforge.net
|
|
||||||
*
|
|
||||||
* png_have_neon implemented for Linux versions which allow access to
|
|
||||||
* /proc/self/auxv. This is probably faster, cleaner and safer than the code to
|
|
||||||
* read /proc/cpuinfo in contrib/arm-neon/linux, however it is yet another piece
|
|
||||||
* of potentially untested code and has more complex dependencies than the code
|
|
||||||
* to read cpuinfo.
|
|
||||||
*
|
|
||||||
* This generic __linux__ implementation requires reading /proc/self/auxv and
|
|
||||||
* looking at each element for one that records NEON capabilities.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <unistd.h> /* for POSIX 1003.1 */
|
|
||||||
#include <errno.h> /* for EINTR */
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <elf.h>
|
|
||||||
#include <asm/hwcap.h>
|
|
||||||
|
|
||||||
/* A read call may be interrupted, in which case it returns -1 and sets errno to
|
|
||||||
* EINTR if nothing was done, otherwise (if something was done) a partial read
|
|
||||||
* may result.
|
|
||||||
*/
|
|
||||||
static size_t
|
|
||||||
safe_read(png_structp png_ptr, int fd, void *buffer_in, size_t nbytes)
|
|
||||||
{
|
|
||||||
size_t ntotal = 0;
|
|
||||||
char *buffer = png_voidcast(char*, buffer_in);
|
|
||||||
|
|
||||||
while (nbytes > 0)
|
|
||||||
{
|
|
||||||
unsigned int nread;
|
|
||||||
int iread;
|
|
||||||
|
|
||||||
/* Passing nread > INT_MAX to read is implementation defined in POSIX
|
|
||||||
* 1003.1, therefore despite the unsigned argument portable code must
|
|
||||||
* limit the value to INT_MAX!
|
|
||||||
*/
|
|
||||||
if (nbytes > INT_MAX)
|
|
||||||
nread = INT_MAX;
|
|
||||||
|
|
||||||
else
|
|
||||||
nread = (unsigned int)/*SAFE*/nbytes;
|
|
||||||
|
|
||||||
iread = read(fd, buffer, nread);
|
|
||||||
|
|
||||||
if (iread == -1)
|
|
||||||
{
|
|
||||||
/* This is the devil in the details, a read can terminate early with 0
|
|
||||||
* bytes read because of EINTR, yet it still returns -1 otherwise end
|
|
||||||
* of file cannot be distinguished.
|
|
||||||
*/
|
|
||||||
if (errno != EINTR)
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "/proc read failed");
|
|
||||||
return 0; /* I.e., a permanent failure */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (iread < 0)
|
|
||||||
{
|
|
||||||
/* Not a valid 'read' result: */
|
|
||||||
png_warning(png_ptr, "OS /proc read bug");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (iread > 0)
|
|
||||||
{
|
|
||||||
/* Continue reading until a permanent failure, or EOF */
|
|
||||||
buffer += iread;
|
|
||||||
nbytes -= (unsigned int)/*SAFE*/iread;
|
|
||||||
ntotal += (unsigned int)/*SAFE*/iread;
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
return ntotal;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ntotal; /* nbytes == 0 */
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
png_have_neon(png_structp png_ptr)
|
|
||||||
{
|
|
||||||
int fd = open("/proc/self/auxv", O_RDONLY);
|
|
||||||
Elf32_auxv_t aux;
|
|
||||||
|
|
||||||
/* Failsafe: failure to open means no NEON */
|
|
||||||
if (fd == -1)
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "/proc/self/auxv open failed");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (safe_read(png_ptr, fd, &aux, sizeof aux) == sizeof aux)
|
|
||||||
{
|
|
||||||
if (aux.a_type == AT_HWCAP && (aux.a_un.a_val & HWCAP_NEON) != 0)
|
|
||||||
{
|
|
||||||
close(fd);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
close(fd);
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,161 +0,0 @@
|
|||||||
/* contrib/arm-neon/linux.c
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014, 2017 Glenn Randers-Pehrson
|
|
||||||
* Written by John Bowler, 2014, 2017.
|
|
||||||
*
|
|
||||||
* This code is released under the libpng license.
|
|
||||||
* For conditions of distribution and use, see the disclaimer
|
|
||||||
* and license in png.h
|
|
||||||
*
|
|
||||||
* SEE contrib/arm-neon/README before reporting bugs
|
|
||||||
*
|
|
||||||
* STATUS: SUPPORTED
|
|
||||||
* BUG REPORTS: png-mng-implement@sourceforge.net
|
|
||||||
*
|
|
||||||
* png_have_neon implemented for Linux by reading the widely available
|
|
||||||
* pseudo-file /proc/cpuinfo.
|
|
||||||
*
|
|
||||||
* This code is strict ANSI-C and is probably moderately portable; it does
|
|
||||||
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
static int
|
|
||||||
png_have_neon(png_structp png_ptr)
|
|
||||||
{
|
|
||||||
FILE *f = fopen("/proc/cpuinfo", "rb");
|
|
||||||
|
|
||||||
if (f != NULL)
|
|
||||||
{
|
|
||||||
/* This is a simple state machine which reads the input byte-by-byte until
|
|
||||||
* it gets a match on the 'neon' feature or reaches the end of the stream.
|
|
||||||
*/
|
|
||||||
static const char ch_feature[] = { 70, 69, 65, 84, 85, 82, 69, 83 };
|
|
||||||
static const char ch_neon[] = { 78, 69, 79, 78 };
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
StartLine, Feature, Colon, StartTag, Neon, HaveNeon, SkipTag, SkipLine
|
|
||||||
} state;
|
|
||||||
int counter;
|
|
||||||
|
|
||||||
for (state=StartLine, counter=0;;)
|
|
||||||
{
|
|
||||||
int ch = fgetc(f);
|
|
||||||
|
|
||||||
if (ch == EOF)
|
|
||||||
{
|
|
||||||
/* EOF means error or end-of-file, return false; neon at EOF is
|
|
||||||
* assumed to be a mistake.
|
|
||||||
*/
|
|
||||||
fclose(f);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (state)
|
|
||||||
{
|
|
||||||
case StartLine:
|
|
||||||
/* Match spaces at the start of line */
|
|
||||||
if (ch <= 32) /* skip control characters and space */
|
|
||||||
break;
|
|
||||||
|
|
||||||
counter=0;
|
|
||||||
state = Feature;
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
|
|
||||||
case Feature:
|
|
||||||
/* Match 'FEATURE', ASCII case insensitive. */
|
|
||||||
if ((ch & ~0x20) == ch_feature[counter])
|
|
||||||
{
|
|
||||||
if (++counter == (sizeof ch_feature))
|
|
||||||
state = Colon;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* did not match 'feature' */
|
|
||||||
state = SkipLine;
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
|
|
||||||
case SkipLine:
|
|
||||||
skipLine:
|
|
||||||
/* Skip everything until we see linefeed or carriage return */
|
|
||||||
if (ch != 10 && ch != 13)
|
|
||||||
break;
|
|
||||||
|
|
||||||
state = StartLine;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Colon:
|
|
||||||
/* Match any number of space or tab followed by ':' */
|
|
||||||
if (ch == 32 || ch == 9)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (ch == 58) /* i.e. ':' */
|
|
||||||
{
|
|
||||||
state = StartTag;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Either a bad line format or a 'feature' prefix followed by
|
|
||||||
* other characters.
|
|
||||||
*/
|
|
||||||
state = SkipLine;
|
|
||||||
goto skipLine;
|
|
||||||
|
|
||||||
case StartTag:
|
|
||||||
/* Skip space characters before a tag */
|
|
||||||
if (ch == 32 || ch == 9)
|
|
||||||
break;
|
|
||||||
|
|
||||||
state = Neon;
|
|
||||||
counter = 0;
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
|
|
||||||
case Neon:
|
|
||||||
/* Look for 'neon' tag */
|
|
||||||
if ((ch & ~0x20) == ch_neon[counter])
|
|
||||||
{
|
|
||||||
if (++counter == (sizeof ch_neon))
|
|
||||||
state = HaveNeon;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
state = SkipTag;
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
|
|
||||||
case SkipTag:
|
|
||||||
/* Skip non-space characters */
|
|
||||||
if (ch == 10 || ch == 13)
|
|
||||||
state = StartLine;
|
|
||||||
|
|
||||||
else if (ch == 32 || ch == 9)
|
|
||||||
state = StartTag;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HaveNeon:
|
|
||||||
/* Have seen a 'neon' prefix, but there must be a space or new
|
|
||||||
* line character to terminate it.
|
|
||||||
*/
|
|
||||||
if (ch == 10 || ch == 13 || ch == 32 || ch == 9)
|
|
||||||
{
|
|
||||||
fclose(f);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
state = SkipTag;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
png_error(png_ptr, "png_have_neon: internal error (bug)");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_WARNINGS_SUPPORTED
|
|
||||||
else
|
|
||||||
png_warning(png_ptr, "/proc/cpuinfo open failed");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
This directory contains test configuration files, currently always '.dfa' files
|
|
||||||
intended to be used in the build by setting the make macro DFA_XTRA to the name
|
|
||||||
of the file.
|
|
||||||
|
|
||||||
These files are used in release validation of the 'configure' builds of libpng
|
|
||||||
by building 'make check', or 'make all-am' for cross-builds, with each .dfa
|
|
||||||
file.
|
|
||||||
|
|
||||||
The files in this directory may change between minor releases, however
|
|
||||||
contributions describing specific builds of libpng are welcomed. There is no
|
|
||||||
guarantee that libpng will continue to build with such configurations; support
|
|
||||||
for given configurations can be, and has been, dropped between successive minor
|
|
||||||
releases. However if a .dfa file describing a configuration is not in this
|
|
||||||
directory it is very unlikely that it will be tested before a minor release!
|
|
||||||
|
|
||||||
You can use these .dfa files as the basis of new configurations. Files in this
|
|
||||||
directory should not have any use restrictions or restrictive licenses.
|
|
||||||
|
|
||||||
This directory is not included in the .zip and .7z distributions, which do
|
|
||||||
not contain 'configure' scripts.
|
|
||||||
|
|
||||||
DOCUMENTATION
|
|
||||||
=============
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
${srcdir}/pngusr.dfa
|
|
||||||
${srcdir}/contrib/pngminim/*/pngusr.dfa
|
|
||||||
|
|
||||||
Documentation of the options:
|
|
||||||
${srcdir}/scripts/pnglibconf.dfa
|
|
||||||
|
|
||||||
Documentation of the file format:
|
|
||||||
${srcdir}/scripts/options.awk
|
|
||||||
|
|
||||||
FILE NAMING
|
|
||||||
===========
|
|
||||||
|
|
||||||
File names in this directory may NOT contain any of the five characters:
|
|
||||||
|
|
||||||
- , + * ?
|
|
||||||
|
|
||||||
Neither may they contain any space character.
|
|
||||||
|
|
||||||
While other characters may be used it is strongly suggested that file names be
|
|
||||||
limited to lower case Latiin alphabetic characters (a-z), digits (0-9) and, if
|
|
||||||
necessary the underscore (_) character. File names should be about 8 characters
|
|
||||||
long (excluding the .dfa extension). Submitted .dfa files should have names
|
|
||||||
between 7 and 16 characters long, shorter names (6 characters or less) are
|
|
||||||
reserved for standard tests.
|
|
@ -1,133 +0,0 @@
|
|||||||
# basic.dfa
|
|
||||||
# Build time configuration of libpng
|
|
||||||
#
|
|
||||||
# Author: John Bowler
|
|
||||||
# Copyright: (c) John Bowler, 2024
|
|
||||||
# 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 basic read and write support. This enables the lowest
|
|
||||||
# level libpng read and write APIs - the "row-by-row" ones.
|
|
||||||
#
|
|
||||||
# Support is enabled only for those transformations that are observed to be
|
|
||||||
# required by widely used apps or are in the v3 specification.
|
|
||||||
#
|
|
||||||
|
|
||||||
everything = off
|
|
||||||
|
|
||||||
# The sequential read code is enabled here; the progressive code can be used
|
|
||||||
# instead but there is no point enabling both.
|
|
||||||
|
|
||||||
option READ on
|
|
||||||
option SEQUENTIAL_READ on
|
|
||||||
option EASY_ACCESS on
|
|
||||||
option SET_USER_LIMITS on
|
|
||||||
option INFO_IMAGE on
|
|
||||||
option READ_16BIT on
|
|
||||||
|
|
||||||
# Errors: these can be disabled but then there won't be any error messages
|
|
||||||
# just failures and the error messages are really needed for apps:
|
|
||||||
option WARNINGS on
|
|
||||||
option ERROR_TEXT on
|
|
||||||
option BENIGN_READ_ERRORS on
|
|
||||||
|
|
||||||
# Required for many display programs such as web browsers:
|
|
||||||
option PROGRESSIVE_READ on
|
|
||||||
|
|
||||||
# Switch on the write code - this makes a minimalist encoder but with
|
|
||||||
# interlace support turned on; otherwise png_read_png..png_write_png will
|
|
||||||
# fail on an interlaced image.
|
|
||||||
option WRITE on
|
|
||||||
option WRITE_INTERLACING on
|
|
||||||
option WRITE_16BIT on
|
|
||||||
|
|
||||||
# Usages of the 'fixed' APIs are relatively rare but they do occur
|
|
||||||
# one or the other for both the API and the internal math.
|
|
||||||
|
|
||||||
#Fixed point:
|
|
||||||
option FIXED_POINT on
|
|
||||||
|
|
||||||
#Floating point:
|
|
||||||
option FLOATING_POINT on
|
|
||||||
option FLOATING_ARITHMETIC on
|
|
||||||
|
|
||||||
# Basic error handling, IO and user memory support. The latter allows the
|
|
||||||
# application program to provide its own implementations of 'malloc' and 'free'.
|
|
||||||
option SETJMP on
|
|
||||||
option STDIO on
|
|
||||||
option USER_MEM on
|
|
||||||
|
|
||||||
# Gamma handling: this needs to be on for the gamma handling
|
|
||||||
option READ_GAMMA on
|
|
||||||
|
|
||||||
# The supported chunks
|
|
||||||
chunk bKGD on
|
|
||||||
chunk cHRM on
|
|
||||||
chunk eXIf on
|
|
||||||
chunk gAMA on
|
|
||||||
chunk iCCP on
|
|
||||||
chunk iTXt on
|
|
||||||
chunk pHYs on
|
|
||||||
chunk sBIT on
|
|
||||||
chunk sRGB on
|
|
||||||
chunk tEXt on
|
|
||||||
chunk tIME on
|
|
||||||
chunk tRNS on
|
|
||||||
chunk zTXt on
|
|
||||||
|
|
||||||
# These don't seem to be used anywhere:
|
|
||||||
# chunk pCAL
|
|
||||||
# chunk sCAL
|
|
||||||
# chunk sPLT
|
|
||||||
|
|
||||||
# The rest of this is app dependent: none of these options are required for
|
|
||||||
# read/write of the full range of PNG files and the normal chunk handling on
|
|
||||||
# read.
|
|
||||||
option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on
|
|
||||||
option WRITE_CUSTOMIZE_COMPRESSION on
|
|
||||||
|
|
||||||
option READ_EXPAND on
|
|
||||||
option READ_FILLER on
|
|
||||||
option READ_GRAY_TO_RGB on
|
|
||||||
option READ_INVERT on
|
|
||||||
option READ_PACK on
|
|
||||||
option READ_RGB_TO_GRAY on
|
|
||||||
option READ_SCALE_16_TO_8 on
|
|
||||||
option READ_SHIFT on
|
|
||||||
option READ_STRIP_16_TO_8 on
|
|
||||||
option READ_STRIP_ALPHA on
|
|
||||||
option READ_SWAP on
|
|
||||||
|
|
||||||
option CONVERT_tIME on
|
|
||||||
|
|
||||||
# optipng
|
|
||||||
option IO_STATE on
|
|
||||||
option STORE_UNKNOWN_CHUNKS on
|
|
||||||
option HANDLE_AS_UNKNOWN on
|
|
||||||
|
|
||||||
# pngcrush
|
|
||||||
option READ_USER_TRANSFORM on
|
|
||||||
option WRITE_FLUSH on
|
|
||||||
|
|
||||||
# pnmtopng
|
|
||||||
chunk hIST on
|
|
||||||
|
|
||||||
# cairo
|
|
||||||
option WRITE_PACKSWAP on
|
|
||||||
option WRITE_USER_TRANSFORM on
|
|
||||||
|
|
||||||
# graphicsmagick
|
|
||||||
option READ_USER_CHUNKS on
|
|
||||||
|
|
||||||
# Qt5.15 qtgui (gentoo package split) Qt6.6 qtbase
|
|
||||||
option READ_BGR on
|
|
||||||
option WRITE_BGR on
|
|
||||||
option READ_SWAP_ALPHA on
|
|
||||||
option WRITE_SWAP_ALPHA on
|
|
||||||
chunk oFFs on
|
|
||||||
|
|
||||||
# ghostscript-gpl
|
|
||||||
option WRITE_INVERT_ALPHA on
|
|
||||||
option WRITE_INVERT on
|
|
@ -1,15 +0,0 @@
|
|||||||
# 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
|
|
@ -1,14 +0,0 @@
|
|||||||
# 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
|
|
@ -1,21 +0,0 @@
|
|||||||
# 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
|
|
@ -1,19 +0,0 @@
|
|||||||
# 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
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
# pngcp.dfa
|
|
||||||
# Build time configuration of libpng
|
|
||||||
#
|
|
||||||
# Author: John Bowler
|
|
||||||
# Copyright: (c) John Bowler, 2016
|
|
||||||
# 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 support for pngcp. This means just png_read_png,
|
|
||||||
# png_write_png and small number of configuration settings.
|
|
||||||
#
|
|
||||||
everything = off
|
|
||||||
|
|
||||||
# This option is specific to this configuration; it adds a #define to the
|
|
||||||
# generated pnglibconf.h which turns on the (not portable) timing option for
|
|
||||||
# pngcp. Note that any option is automatically preceded by PNG_; there is no
|
|
||||||
# way round this and this is deliberate.
|
|
||||||
option PNGCP_TIMING
|
|
||||||
|
|
||||||
# Because of the everything off above the option must also be turned on. This
|
|
||||||
# may not be done in one step because it is safer and avoids mis-spelled options
|
|
||||||
# in user .dfa files to error out if an unrecognized option is turned on.
|
|
||||||
option PNGCP_TIMING on
|
|
||||||
|
|
||||||
# Options to turn on png_read_png and png_write_png:
|
|
||||||
option INFO_IMAGE on
|
|
||||||
option SEQUENTIAL_READ on
|
|
||||||
option EASY_ACCESS on
|
|
||||||
option WRITE on
|
|
||||||
option WRITE_16BIT on
|
|
||||||
option WRITE_FILTER on
|
|
||||||
|
|
||||||
# pngcp needs this to preserve unknown chunks, switching all these on means that
|
|
||||||
# pngcp can work without explicit known chunk reading support
|
|
||||||
option UNKNOWN_CHUNKS on
|
|
||||||
option SET_UNKNOWN_CHUNKS on
|
|
||||||
option HANDLE_AS_UNKNOWN on
|
|
||||||
option SAVE_UNKNOWN_CHUNKS on
|
|
||||||
option WRITE_UNKNOWN_CHUNKS on
|
|
||||||
|
|
||||||
# pngcp needs this to handle palette files with invalid indices:
|
|
||||||
option CHECK_FOR_INVALID_INDEX on
|
|
||||||
option GET_PALETTE_MAX on
|
|
||||||
|
|
||||||
# Pre-libpng 1.7 pngcp has to stash text chunks manually, post 1.7 without this
|
|
||||||
# text chunks should be handled as unknown ok.
|
|
||||||
option TEXT on
|
|
||||||
|
|
||||||
# this is used to turn off limits:
|
|
||||||
option USER_LIMITS on
|
|
||||||
option SET_USER_LIMITS on
|
|
||||||
|
|
||||||
# these are just required for specific customizations
|
|
||||||
option WRITE_CUSTOMIZE_ZTXT_COMPRESSION on
|
|
||||||
option WRITE_CUSTOMIZE_COMPRESSION on
|
|
@ -1,13 +0,0 @@
|
|||||||
# 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
|
|
@ -1,58 +0,0 @@
|
|||||||
# read.dfa
|
|
||||||
# Build time configuration of libpng
|
|
||||||
#
|
|
||||||
# Author: John Bowler
|
|
||||||
# Copyright: (c) John Bowler, 2013
|
|
||||||
# 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 basic read support. This enables the lowest level libpng
|
|
||||||
# read API - the one where the calling code has to use a loop to read each row.
|
|
||||||
# At present this is the API used by most programs.
|
|
||||||
#
|
|
||||||
# Support is enabled only for those chunks and transformations that are
|
|
||||||
# typically required - others can be added easily.
|
|
||||||
#
|
|
||||||
|
|
||||||
everything = off
|
|
||||||
|
|
||||||
# The sequential read code is enabled here; the progressive code can be used
|
|
||||||
# instead but there is no point enabling both.
|
|
||||||
|
|
||||||
option SEQUENTIAL_READ on
|
|
||||||
|
|
||||||
# Likewise it is pointless enabling both fixed and floating point APIs. Choose
|
|
||||||
# one or the other for both the API and the internal math.
|
|
||||||
|
|
||||||
#Fixed point:
|
|
||||||
#option FIXED_POINT on
|
|
||||||
#option FLOATING_ARITHMETIC off
|
|
||||||
|
|
||||||
#Floating point:
|
|
||||||
option FLOATING_POINT on
|
|
||||||
option FLOATING_ARITHMETIC on
|
|
||||||
|
|
||||||
# Basic error handling, IO and user memory support. The latter allows the
|
|
||||||
# application program to provide its own implementations of 'malloc' and 'free'.
|
|
||||||
option SETJMP on
|
|
||||||
option STDIO on
|
|
||||||
option USER_MEM on
|
|
||||||
|
|
||||||
# To read the full set of PNG images correctly interlace, transparency and
|
|
||||||
# 16-bit support is required. The application can implement interlace itself,
|
|
||||||
# but very few do and it's no longer possible to disable it when READ is
|
|
||||||
# enabled.
|
|
||||||
option READ_tRNS on
|
|
||||||
option READ_16BIT on
|
|
||||||
|
|
||||||
# Everything else is application dependent. This file assumes the app handles
|
|
||||||
# all the native PNG bit layouts, so it doesn't need any of layout change
|
|
||||||
# transforms, but needs libpng to perform gamma correction. It doesn't do any
|
|
||||||
# colorspace stuff and ignores the 'significant bit' information.
|
|
||||||
#
|
|
||||||
# If your app always expands the image to a limited set of bit layouts you
|
|
||||||
# probably want to consider using the simplified API instead of the low level
|
|
||||||
# one - see png.h and s_read.dfa.
|
|
||||||
option READ_GAMMA on
|
|
@ -1,35 +0,0 @@
|
|||||||
# s_read.dfa
|
|
||||||
# Build time configuration of libpng
|
|
||||||
#
|
|
||||||
# Author: John Bowler
|
|
||||||
# Copyright: (c) John Bowler, 2013
|
|
||||||
# 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 simplified read support (only). This builds a minimal
|
|
||||||
# libpng able to read all PNG formats and convert them into a small number of
|
|
||||||
# well understood memory formats.
|
|
||||||
#
|
|
||||||
|
|
||||||
everything = off
|
|
||||||
|
|
||||||
option SIMPLIFIED_READ on
|
|
||||||
|
|
||||||
# It isn't necessary to chose fixed or floating point for the APIs because the
|
|
||||||
# simplified API doesn't need fixed or floating point numbers. It is necessary
|
|
||||||
# to chose an internal math implementation. The default (because of 'everything
|
|
||||||
# = off') is fixed point - turn the floating point implementation on if you have
|
|
||||||
# hardware floating point or prefer your software floating point implementation.
|
|
||||||
option FLOATING_ARITHMETIC on
|
|
||||||
|
|
||||||
# This is not strictly necessary, but without it the message strings in the API
|
|
||||||
# will not be filled in
|
|
||||||
option ERROR_TEXT on
|
|
||||||
|
|
||||||
# Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't
|
|
||||||
# need this if you don't use them, they just allow the in-memory layout to be
|
|
||||||
# changed to match common hardware formats.
|
|
||||||
option SIMPLIFIED_READ_AFIRST on
|
|
||||||
option SIMPLIFIED_READ_BGR on
|
|
@ -1,33 +0,0 @@
|
|||||||
# s_write.dfa
|
|
||||||
# Build time configuration of libpng
|
|
||||||
#
|
|
||||||
# Author: John Bowler
|
|
||||||
# Copyright: (c) John Bowler, 2013
|
|
||||||
# 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 (just) simplified write support
|
|
||||||
#
|
|
||||||
|
|
||||||
everything = off
|
|
||||||
|
|
||||||
option SIMPLIFIED_WRITE on
|
|
||||||
|
|
||||||
# It isn't necessary to chose fixed or floating point for the APIs because the
|
|
||||||
# simplified API doesn't need fixed or floating point numbers. It is necessary
|
|
||||||
# to chose an internal math implementation. The default (because of 'everything
|
|
||||||
# = off') is fixed point - turn the floating point implementation on if you have
|
|
||||||
# hardware floating point or prefer your software floating point implementation.
|
|
||||||
option FLOATING_ARITHMETIC on
|
|
||||||
|
|
||||||
# This is not strictly necessary, but without it the message strings in the API
|
|
||||||
# will not be filled in
|
|
||||||
option ERROR_TEXT on
|
|
||||||
|
|
||||||
# Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't
|
|
||||||
# need this if you don't use them, they just allow the in-memory layout to be
|
|
||||||
# changed to match common hardware formats.
|
|
||||||
option SIMPLIFIED_WRITE_AFIRST on
|
|
||||||
option SIMPLIFIED_WRITE_BGR on
|
|
@ -1,36 +0,0 @@
|
|||||||
# simple.dfa
|
|
||||||
# Build time configuration of libpng
|
|
||||||
#
|
|
||||||
# Author: John Bowler
|
|
||||||
# Copyright: (c) John Bowler, 2013
|
|
||||||
# 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 just the simplified APIs (read and write).
|
|
||||||
#
|
|
||||||
|
|
||||||
everything = off
|
|
||||||
|
|
||||||
option SIMPLIFIED_WRITE on
|
|
||||||
option SIMPLIFIED_READ on
|
|
||||||
|
|
||||||
# It isn't necessary to chose fixed or floating point for the APIs because the
|
|
||||||
# simplified API doesn't need fixed or floating point numbers. It is necessary
|
|
||||||
# to chose an internal math implementation. The default (because of 'everything
|
|
||||||
# = off') is fixed point - turn the floating point implementation on if you have
|
|
||||||
# hardware floating point or prefer your software floating point implementation.
|
|
||||||
option FLOATING_ARITHMETIC on
|
|
||||||
|
|
||||||
# This is not strictly necessary, but without it the message strings in the API
|
|
||||||
# will not be filled in
|
|
||||||
option ERROR_TEXT on
|
|
||||||
|
|
||||||
# Switching these options on enables the 'AFIRST' and 'BGR' formats - you don't
|
|
||||||
# need this if you don't use them, they just allow the in-memory layout to be
|
|
||||||
# changed to match common hardware formats.
|
|
||||||
option SIMPLIFIED_READ_AFIRST on
|
|
||||||
option SIMPLIFIED_READ_BGR on
|
|
||||||
option SIMPLIFIED_WRITE_AFIRST on
|
|
||||||
option SIMPLIFIED_WRITE_BGR on
|
|
@ -1,13 +0,0 @@
|
|||||||
# 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
|
|
@ -1,45 +0,0 @@
|
|||||||
# write.dfa
|
|
||||||
# Build time configuration of libpng
|
|
||||||
#
|
|
||||||
# Author: John Bowler
|
|
||||||
# Copyright: (c) John Bowler, 2013
|
|
||||||
# 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 minimal write support.
|
|
||||||
#
|
|
||||||
|
|
||||||
everything = off
|
|
||||||
|
|
||||||
# Switch on the write code - this makes a minimalist encoder
|
|
||||||
|
|
||||||
option WRITE on
|
|
||||||
|
|
||||||
# Choose fixed or floating point APIs and arithmetic. The choices are
|
|
||||||
# independent but normally they will match. It is typically better to use the
|
|
||||||
# floating point if you have floating point hardware. If you don't know, or
|
|
||||||
# (perhaps) to make libpng smaller used fixed point throughout.
|
|
||||||
|
|
||||||
#Fixed point:
|
|
||||||
#option FIXED_POINT on
|
|
||||||
#option FLOATING_ARITHMETIC off
|
|
||||||
|
|
||||||
#Floating point:
|
|
||||||
option FLOATING_POINT on
|
|
||||||
option FLOATING_ARITHMETIC on
|
|
||||||
|
|
||||||
# Basic error handling, IO and user memory support. The latter allows the
|
|
||||||
# application program to provide its own implementations of 'malloc' and 'free'.
|
|
||||||
option SETJMP on
|
|
||||||
option STDIO on
|
|
||||||
option USER_MEM on
|
|
||||||
|
|
||||||
# Everything else is optional. Unlike the read code in libpng the write code
|
|
||||||
# does not need to deal with arbitrary formats, so only add support for things
|
|
||||||
# you really do write! For example you might only write sRGB images, sometimes
|
|
||||||
# with transparency and never write 16 bit images, so:
|
|
||||||
option WRITE_sRGB on
|
|
||||||
option WRITE_tRNS on
|
|
||||||
#option WRITE_16BIT off (this is the default with 'everything = off')
|
|
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