mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
113 Commits
libpng-1.5
...
v1.5.21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
49
ANNOUNCE
49
ANNOUNCE
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.5.16 - May 23, 2013
|
Libpng 1.5.21 - December 22, 2014
|
||||||
|
|
||||||
This is a public release of libpng, intended for use in production codes.
|
This is a public release of libpng, intended for use in production codes.
|
||||||
|
|
||||||
@@ -8,48 +8,27 @@ Files available for download:
|
|||||||
Source files with LF line endings (for Unix/Linux) and with a
|
Source files with LF line endings (for Unix/Linux) and with a
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
libpng-1.5.16.tar.xz (LZMA-compressed, recommended)
|
libpng-1.5.21.tar.xz (LZMA-compressed, recommended)
|
||||||
libpng-1.5.16.tar.gz
|
libpng-1.5.21.tar.gz
|
||||||
libpng-1.5.16.tar.bz2
|
libpng-1.5.21.tar.bz2
|
||||||
|
|
||||||
Source files with CRLF line endings (for Windows), without the
|
Source files with CRLF line endings (for Windows), without the
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
lpng1516.7z (LZMA-compressed, recommended)
|
lpng1521.7z (LZMA-compressed, recommended)
|
||||||
lpng1516.zip
|
lpng1521.zip
|
||||||
|
|
||||||
Other information:
|
Other information:
|
||||||
|
|
||||||
libpng-1.5.16-README.txt
|
libpng-1.5.21-README.txt
|
||||||
libpng-1.5.16-LICENSE.txt
|
libpng-1.5.21-LICENSE.txt
|
||||||
|
libpng-1.5.21-*.asc (armored detached GPG signatures)
|
||||||
|
|
||||||
Changes since the last public release (1.5.15):
|
Changes since the last public release (1.5.20):
|
||||||
|
Revised Makefile.am and scripts/*.dfn to work with MinGW/MSYS;
|
||||||
Corrected a misplaced closing bracket in contrib/libtests/pngvalid.c
|
renamed scripts/*.dfn to scripts/*.c (Bob Friesenhahn and John Bowler).
|
||||||
(Flavio Medeiros).
|
Restored a test on width that was removed from png.c at libpng-1.6.9
|
||||||
Revised stack marking in arm/filter_neon.S and configure.ac
|
(Bug report by Alex Eubanks).
|
||||||
Ensure that NEON filter stuff is completely disabled when switched 'off'.
|
|
||||||
Previously the ARM NEON specific files were still built if the option
|
|
||||||
was switched 'off' as opposed to being explicitly disabled.
|
|
||||||
Avoid a compiler warning about unused png_ptr in translate_gamma_flags()
|
|
||||||
Revise pngtest.c to skip tests of unsupported features.
|
|
||||||
Test for 'arm*' not just 'arm' in the host_cpu configure variable.
|
|
||||||
Rebuilt the configure scripts.
|
|
||||||
Expanded manual paragraph about writing private chunks, particularly
|
|
||||||
the need to call png_set_keep_unknown_chunks() when writing them.
|
|
||||||
Updated contrib/pngminus/pnm2png.c (Paul Stewart):
|
|
||||||
Check for EOF
|
|
||||||
Ignore "#" delimited comments in input file to pnm2png.c.
|
|
||||||
Fixed whitespace handling
|
|
||||||
Added a call to png_set_packing()
|
|
||||||
Initialize dimension values so if sscanf fails at least we have known
|
|
||||||
invalid values.
|
|
||||||
Allow contrib/pnminus/pnm2png.c to compile without WRITE_INVERT and WRITE_PACK
|
|
||||||
supported (writes error message that it can't read P1 or P4 PBM files).
|
|
||||||
Revised contrib/pngminim/*/makefile to separate CPPFLAGS and CFLAGS, and
|
|
||||||
to generate pnglibconf.h with the right zlib header files.
|
|
||||||
Ported contrib/pngminus/pnm2png.c changes back from libpng-1.6.3beta06,
|
|
||||||
to use unsigned long, not png_uint_32 arguments to sscanf().
|
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
182
CHANGES
182
CHANGES
@@ -3969,7 +3969,7 @@ Version 1.5.14beta07 [January 6, 2012]
|
|||||||
|
|
||||||
Version 1.5.14beta08 [January 10, 2013]
|
Version 1.5.14beta08 [January 10, 2013]
|
||||||
Check validity of "num_unknowns" parameter of png_set_unknown_chunks()
|
Check validity of "num_unknowns" parameter of png_set_unknown_chunks()
|
||||||
(Bug report from yuris).
|
(Bug report from yuris; later assigned CVE-2013-7353).
|
||||||
|
|
||||||
Version 1.5.14rc01 [January 17, 2013]
|
Version 1.5.14rc01 [January 17, 2013]
|
||||||
No changes.
|
No changes.
|
||||||
@@ -3979,7 +3979,7 @@ Version 1.5.14rc02 [January 17, 2013]
|
|||||||
|
|
||||||
Version 1.5.14rc03 [January 18, 2013]
|
Version 1.5.14rc03 [January 18, 2013]
|
||||||
Check the validity of the "nentries" parameter of png_set_sPLT() and the
|
Check the validity of the "nentries" parameter of png_set_sPLT() and the
|
||||||
"num_text" parameter of png_set_text_2().
|
"num_text" parameter of png_set_text_2() (CVE-2013-7354).
|
||||||
|
|
||||||
Version 1.5.14 [January 24, 2013]
|
Version 1.5.14 [January 24, 2013]
|
||||||
Removed an obsolete line from the manual.
|
Removed an obsolete line from the manual.
|
||||||
@@ -4111,6 +4111,184 @@ Version 1.5.16rc01 [May 16, 2013]
|
|||||||
No changes.
|
No changes.
|
||||||
|
|
||||||
Version 1.5.16 [May 23, 2013]
|
Version 1.5.16 [May 23, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.17beta01 [June 8, 2013]
|
||||||
|
Removed a redundant test from png_set_IHDR().
|
||||||
|
Added set(CMAKE_CONFIGURATION_TYPES ...) to CMakeLists.txt (Andrew Hundt)
|
||||||
|
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
|
||||||
|
Make ARM NEON support work at compile time (not just configure time).
|
||||||
|
This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
|
||||||
|
using a compiler that compiles for multiple architectures at one time.
|
||||||
|
Removed PNG_FILTER_OPTIMIZATIONS and PNG_ARM_NEON_SUPPORTED from
|
||||||
|
pnglibconf.h, allowing more of the decisions to be made internally
|
||||||
|
(pngpriv.h) during the compile. Without this, symbol prefixing is broken
|
||||||
|
under certain circumstances on ARM platforms. Now only the API parts of
|
||||||
|
the optimizations ('check' vs 'api') are exposed in the public header files
|
||||||
|
except that the new setting PNG_ARM_NEON_OPT documents how libpng makes the
|
||||||
|
decision about whether or not to use the optimizations.
|
||||||
|
Protect symbol prefixing against CC/CPPFLAGS/CFLAGS useage.
|
||||||
|
Previous iOS/Xcode fixes for the ARM NEON optimizations moved the test
|
||||||
|
on __ARM_NEON__ from configure time to compile time. This breaks symbol
|
||||||
|
prefixing because the definition of the special png_init_filter_functions
|
||||||
|
call was hidden at configure time if the relevant compiler arguments are
|
||||||
|
passed in CFLAGS as opposed to CC. This change attempts to avoid all
|
||||||
|
the confusion that would result by declaring the init function even when
|
||||||
|
it is not used, so that it will always get prefixed.
|
||||||
|
|
||||||
|
Version 1.5.17rc01 [June 17, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.17rc02 [June 18, 2013]
|
||||||
|
Revised libpng.3 so that "doclifter" can process it.
|
||||||
|
|
||||||
|
Version 1.5.17rc03 [June 25, 2013]
|
||||||
|
Revised example.c to illustrate use of PNG_DEFAULT_sRGB and PNG_GAMMA_MAC_18
|
||||||
|
as parameters for png_set_gamma(). These have been available since
|
||||||
|
libpng-1.5.4.
|
||||||
|
|
||||||
|
Version 1.5.17 [June 27, 2013]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.18beta01 [August 21, 2013]
|
||||||
|
Delay calling png_init_filter_functions() until a row with nonzero filter
|
||||||
|
is found.
|
||||||
|
|
||||||
|
Version 1.5.18beta02 [December 26, 2013]
|
||||||
|
Changed tabs to 3 spaces in png_debug macros and changed '"%s"m'
|
||||||
|
to '"%s" m' to improve portability among compilers.
|
||||||
|
Added "-Wall" to CFLAGS in contrib/pngminim/*/makefile
|
||||||
|
Conditionally compile some unused functions reported by -Wall in
|
||||||
|
pngminim.
|
||||||
|
Rebuilt configure scripts with automake-1.14.1 and autoconf-2.69
|
||||||
|
in the tar distributions.
|
||||||
|
|
||||||
|
Version 1.5.18beta03 [January 1, 2014]
|
||||||
|
Fixed 'unused' warnings and merged with libpng16 pngvalid.
|
||||||
|
Various warnings revealed by configurations added to the tested
|
||||||
|
configurations in libpng 1.6 need corresponding fixes in libpng 1.5.
|
||||||
|
This takes the libpng 1.6 pngvalid.c and adds it back to libpng 1.5,
|
||||||
|
however one write-only test is currently disabled because it does not
|
||||||
|
work; possibly because of failures to reset or initialize the deflate
|
||||||
|
stream correctly in write-only cases.
|
||||||
|
Merged libpng-1.7 changes and created a single pngvalid.c
|
||||||
|
Merged pngvalid and pngtest from libpng-1.5; made compressed chunks
|
||||||
|
after IDAT work with the progressive read code (this is a minor and
|
||||||
|
somewhat ugly fix-up; the proper fix is in 1.6).
|
||||||
|
The 'make all-am' command no longer builds $(check_PROGRAMS), leading
|
||||||
|
to a lack of checks on cross-builds such as ARM. Makefile.am also
|
||||||
|
requires correct dependencies for the check programs on pnglibconf.h
|
||||||
|
otherwise parallel builds on fast machines can sometimes pick up the
|
||||||
|
system pnglibconf.h.
|
||||||
|
Rebuilt configure scripts with automake 1.14.1 and autoconf-2.69.
|
||||||
|
Require automake-1.13 and enable automake "subdirs" feature in autoconf.ac
|
||||||
|
Allow unversioned links created on install to be disabled in configure.
|
||||||
|
In configure builds 'make install' changes/adds links like png.h
|
||||||
|
and libpng.a to point to the newly installed, versioned, files (e.g.
|
||||||
|
libpng17/png.h and libpng17.a). Three new configure options and some
|
||||||
|
rearrangement of Makefile.am allow creation of these links to be disabled.
|
||||||
|
|
||||||
|
Version 1.5.18beta04 [January 10, 2014]
|
||||||
|
Removed potentially misleading warning from png_check_IHDR().
|
||||||
|
|
||||||
|
Version 1.5.18beta05 [January 20, 2014]
|
||||||
|
Updated scripts/makefile.* to use CPPFLAGS (Cosmin)
|
||||||
|
|
||||||
|
Version 1.5.18rc01 [January 28, 2014]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.18rc02 [January 30, 2014]
|
||||||
|
Quiet an uninitialized memory warning from VC2013 in png_get_png().
|
||||||
|
|
||||||
|
Version 1.5.18 [February 6, 2014]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.19beta01 [February 26, 2014]
|
||||||
|
Moved redefines of png_error(), png_warning(), png_chunk_error(),
|
||||||
|
and png_chunk_warning() from pngpriv.h to png.h to make them visible
|
||||||
|
to libpng-calling applications.
|
||||||
|
Fixed typos in the manual and in scripts/pnglibconf.dfa (CFLAGS -> CPPFLAGS
|
||||||
|
and PNG_USR_CONFIG -> PNG_USER_CONFIG).
|
||||||
|
|
||||||
|
Version 1.5.19beta02 [March 17, 2014]
|
||||||
|
Use "if (value != 0)" instead of "if (value)" consistently.
|
||||||
|
Moved configuration information from the manual to the INSTALL file.
|
||||||
|
|
||||||
|
Version 1.5.19beta03 [April 6, 2014]
|
||||||
|
Removed #if/#else/#endif from inside two pow() calls in pngvalid.c because
|
||||||
|
they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3
|
||||||
|
when using its "__builtin_pow()" function.
|
||||||
|
Silence 'unused parameter' build warnings (Cosmin).
|
||||||
|
$(CP) is now used alongside $(RM_F). Also, use 'copy' instead
|
||||||
|
of 'cp' where applicable, and applied other minor makefile changes.
|
||||||
|
Don't warn about invalid dimensions exceeding user limits.
|
||||||
|
Allow an easy replacement of the default pre-built configuration
|
||||||
|
header with a custom header, via the make PNGLIBCONF_H_PREBUILT
|
||||||
|
macro.
|
||||||
|
Fixed a typo in pngrutil.c, introduced in libpng-1.5.6, that interferes
|
||||||
|
with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss).
|
||||||
|
|
||||||
|
Version 1.5.19beta04 [August 4, 2014]
|
||||||
|
Removed scripts/makefile.elf. It has not worked since libpng-1.5.0beta14
|
||||||
|
due to elimination of the PNG_FUNCTION_EXPORT and PNG_DATA_EXPORT
|
||||||
|
definitions from pngconf.h.
|
||||||
|
|
||||||
|
Version 1.5.19beta05 [August 8, 2014]
|
||||||
|
Added opinion that the ECCN (Export Control Classification Number) for
|
||||||
|
libpng is EAR99 to the README file.
|
||||||
|
Eliminated use of "$<" in makefile explicit rules, when copying
|
||||||
|
$PNGLIBCONF_H_PREBUILT. This does not work on some versions of make;
|
||||||
|
bug introduced in libpng version 1.5.19beta03.
|
||||||
|
|
||||||
|
Version 1.5.19rc01 [August 14, 2014]
|
||||||
|
Made "ccopts" agree with "CFLAGS" in scripts/makefile.hp* and makefile.*sunu
|
||||||
|
|
||||||
|
Version 1.5.19 [August 21, 2014]
|
||||||
|
Added PNG_UNUSED(png_ptr) and PNG_UNUSED(val) in png_longjmp() (Cosmin).
|
||||||
|
|
||||||
|
Version 1.5.20beta01 [November 6, 2014]
|
||||||
|
Removed "option WRITE_COMPRESSED_TEXT enables WRITE_TEXT" from pnglibconf.dfa
|
||||||
|
Only mark text chunks as written after successfully writing them.
|
||||||
|
Avoid out-of-bounds memory access in png_user_version_check().
|
||||||
|
Simplified and future-proofed png_user_version_check().
|
||||||
|
|
||||||
|
Version 1.5.20beta02 [November 10, 2014]
|
||||||
|
Quieted three "comparison is always false due to limited range" compiler
|
||||||
|
warnings in pngset.c
|
||||||
|
|
||||||
|
Version 1.5.20rc01 [November 13, 2014]
|
||||||
|
|
||||||
|
Version 1.5.20rc02 [November 14, 2014]]
|
||||||
|
The macros passed in the command line to Borland make were ignored if
|
||||||
|
similarly-named macros were already defined in makefiles. This behavior
|
||||||
|
is different from POSIX make and other make programs. Surround the
|
||||||
|
macro definitions with ifndef guards (Cosmin).
|
||||||
|
Use memcpy instead of CopyMemory in the definition of png_memcpy.
|
||||||
|
The Borland C++ build breaks otherwise (Cosmin).
|
||||||
|
|
||||||
|
Version 1.5.20rc03 [November 17, 2014]
|
||||||
|
Added "-D_CRT_SECURE_NO_WARNINGS" to CFLAGS in scripts/makefile.vcwin32
|
||||||
|
Removed the obsolete $ARCH variable from scripts/makefile.darwin.
|
||||||
|
|
||||||
|
Version 1.5.20 [November 20, 2014]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.21beta01 [December 14, 2014]
|
||||||
|
Revised Makefile.am and scripts/*.dfn to work with MinGW/MSYS;
|
||||||
|
renamed scripts/*.dfn to scripts/*.c (Bob Friesenhahn and John Bowler).
|
||||||
|
|
||||||
|
Version 1.5.21rc01 [December 21, 2014]
|
||||||
|
Restored a test on width that was removed from png.c at libpng-1.6.9
|
||||||
|
(Bug report by Alex Eubanks).
|
||||||
|
|
||||||
|
Version 1.5.21rc02 [December 21, 2014]
|
||||||
|
Undid the update to pngrutil.c in 1.6.16rc01.
|
||||||
|
|
||||||
|
Version 1.5.21rc03 [December 21, 2014]
|
||||||
|
Fixed an overflow in png_combine_row with very wide interlaced images.
|
||||||
|
|
||||||
|
Version 1.5.21 [December 22, 2014]
|
||||||
|
No changes.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# CMakeLists.txt
|
# CMakeLists.txt
|
||||||
|
|
||||||
# Copyright (C) 2007-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2007-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
# 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
|
||||||
@@ -9,33 +9,14 @@
|
|||||||
cmake_minimum_required(VERSION 2.4.4)
|
cmake_minimum_required(VERSION 2.4.4)
|
||||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||||
|
|
||||||
if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
|
set(CMAKE_CONFIGURATION_TYPES "Release;Debug;MinSizeRel;RelWithDebInfo")
|
||||||
if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4)
|
|
||||||
# workaround CMake 2.4.x bug
|
|
||||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
|
||||||
"Choose the type of build, options are:
|
|
||||||
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
|
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
RelWithDebInfo
|
|
||||||
MinSizeRel.")
|
|
||||||
else()
|
|
||||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
|
||||||
"Choose the type of build, options are:
|
|
||||||
None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
|
|
||||||
Debug
|
|
||||||
Release
|
|
||||||
RelWithDebInfo
|
|
||||||
MinSizeRel.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
project(libpng C)
|
project(libpng C)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
set(PNGLIB_MAJOR 1)
|
set(PNGLIB_MAJOR 1)
|
||||||
set(PNGLIB_MINOR 5)
|
set(PNGLIB_MINOR 5)
|
||||||
set(PNGLIB_RELEASE 16)
|
set(PNGLIB_RELEASE 21)
|
||||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||||
|
|
||||||
@@ -204,6 +185,8 @@ macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
|
|||||||
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
|
||||||
else(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
else(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||||
get_filename_component(LINK_TARGET "${SRC_FILE}" NAME)
|
get_filename_component(LINK_TARGET "${SRC_FILE}" NAME)
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${LINK_TARGET}" ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||||
@@ -236,7 +219,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
|
|||||||
# SET UP LINKS
|
# SET UP LINKS
|
||||||
if(PNG_SHARED)
|
if(PNG_SHARED)
|
||||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||||
# VERSION 15.${PNGLIB_RELEASE}.1.5.16
|
# VERSION 15.${PNGLIB_RELEASE}.1.5.21
|
||||||
VERSION 15.${PNGLIB_RELEASE}.0
|
VERSION 15.${PNGLIB_RELEASE}.0
|
||||||
SOVERSION 15
|
SOVERSION 15
|
||||||
CLEAN_DIRECT_OUTPUT 1)
|
CLEAN_DIRECT_OUTPUT 1)
|
||||||
@@ -334,7 +317,7 @@ if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL )
|
|||||||
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
|
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# what's with libpng-$VER%.txt and all the extra files?
|
# what's with libpng-manual.txt and all the extra files?
|
||||||
|
|
||||||
# UNINSTALL
|
# UNINSTALL
|
||||||
# do we need this?
|
# do we need this?
|
||||||
|
|||||||
264
INSTALL
264
INSTALL
@@ -1,13 +1,43 @@
|
|||||||
|
|
||||||
Installing libpng
|
Installing libpng
|
||||||
|
|
||||||
|
Contents
|
||||||
|
|
||||||
|
I. Simple installation
|
||||||
|
II. Rebuilding the configure scripts
|
||||||
|
III. Using scripts/makefile*
|
||||||
|
IV. Using cmake
|
||||||
|
V. Directory structure
|
||||||
|
VI. Building with project files
|
||||||
|
VII. Building with makefiles
|
||||||
|
VIII. Configuring libpng for 16-bit platforms
|
||||||
|
IX. Configuring for DOS
|
||||||
|
X. Configuring for Medium Model
|
||||||
|
XI. Omitted
|
||||||
|
XII. Configuring for compiler xxx:
|
||||||
|
XIII. Removing unwanted object code
|
||||||
|
XIV. Changes to the build and configuration of libpng in libpng-1.5.x
|
||||||
|
XV. Configuring libpng for multiprocessing
|
||||||
|
XVI. Other sources of information about libpng
|
||||||
|
|
||||||
|
I. Simple installation
|
||||||
|
|
||||||
On Unix/Linux and similar systems, you can simply type
|
On Unix/Linux and similar systems, you can simply type
|
||||||
|
|
||||||
./configure [--prefix=/path]
|
./configure [--prefix=/path]
|
||||||
make check
|
make check
|
||||||
make install
|
make install
|
||||||
|
|
||||||
and ignore the rest of this document.
|
and ignore the rest of this document. "/path" is the path to the directory
|
||||||
|
where you want to install the libpng "lib", "include", and "bin"
|
||||||
|
subdirectories.
|
||||||
|
|
||||||
|
Note that "configure" is only included in the "*.tar" distributions and not
|
||||||
|
in the "*.zip" or "*.7z" distributions. If you downloaded one of those
|
||||||
|
distributions, see "Building with project files" or "Building with makefiles",
|
||||||
|
below.
|
||||||
|
|
||||||
|
II. Rebuilding the configure scripts
|
||||||
|
|
||||||
If configure does not work on your system, or if you have a need to
|
If configure does not work on your system, or if you have a need to
|
||||||
change configure.ac or Makefile.am, and you have a reasonably
|
change configure.ac or Makefile.am, and you have a reasonably
|
||||||
@@ -24,9 +54,12 @@ aren't using any of the included pre-built scripts, you can do this:
|
|||||||
make install
|
make install
|
||||||
make check
|
make check
|
||||||
|
|
||||||
|
III. Using scripts/makefile*
|
||||||
|
|
||||||
Instead, you can use one of the custom-built makefiles in the
|
Instead, you can use one of the custom-built makefiles in the
|
||||||
"scripts" directory
|
"scripts" directory
|
||||||
|
|
||||||
|
cp scripts/pnglibconf.h.prebuilt pnglibconf.h
|
||||||
cp scripts/makefile.system makefile
|
cp scripts/makefile.system makefile
|
||||||
make test
|
make test
|
||||||
make install
|
make install
|
||||||
@@ -38,8 +71,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. zlib can be placed in another directory,
|
wherever you got libpng; otherwise go to http://zlib.net. You can place
|
||||||
at the same level as libpng.
|
zlib in 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
|
||||||
@@ -59,15 +92,23 @@ LD_LIBRARY_PATH="$ZLIBLIB:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH
|
|||||||
If you are using one of the makefile scripts, put ZLIBLIB and ZLIBINC
|
If you are using one of the makefile scripts, put ZLIBLIB and ZLIBINC
|
||||||
in your environment and type "make ZLIBLIB=$ZLIBLIB ZLIBINC=$ZLIBINC test".
|
in your environment and type "make ZLIBLIB=$ZLIBLIB ZLIBINC=$ZLIBINC test".
|
||||||
|
|
||||||
|
IV. Using cmake
|
||||||
|
|
||||||
If you want to use "cmake" (see www.cmake.org), type
|
If you want to use "cmake" (see www.cmake.org), type
|
||||||
|
|
||||||
cmake . -DCMAKE_INSTALL_PREFIX=/path
|
cmake . -DCMAKE_INSTALL_PREFIX=/path
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
As when using the simple configure method described above, "/path" points to
|
||||||
|
the installation directory where you want to put the libpng "lib", "include",
|
||||||
|
and "bin" subdirectories.
|
||||||
|
|
||||||
|
V. Directory structure
|
||||||
|
|
||||||
You can rename the directories that you downloaded (they
|
You can rename the directories that you downloaded (they
|
||||||
might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.7"
|
might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.8"
|
||||||
or "zlib127") so that you have directories called "zlib" and "libpng".
|
or "zlib128") so that you have directories called "zlib" and "libpng".
|
||||||
|
|
||||||
Your directory structure should look like this:
|
Your directory structure should look like this:
|
||||||
|
|
||||||
@@ -75,8 +116,7 @@ Your directory structure should look like this:
|
|||||||
libpng (this directory)
|
libpng (this directory)
|
||||||
INSTALL (this file)
|
INSTALL (this file)
|
||||||
README
|
README
|
||||||
*.h
|
*.h, *.c => libpng source files
|
||||||
*.c
|
|
||||||
CMakeLists.txt => "cmake" script
|
CMakeLists.txt => "cmake" script
|
||||||
configuration files:
|
configuration files:
|
||||||
configure.ac, configure, Makefile.am, Makefile.in,
|
configure.ac, configure, Makefile.am, Makefile.in,
|
||||||
@@ -84,15 +124,9 @@ Your directory structure should look like this:
|
|||||||
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
|
depcomp, install-sh, mkinstalldirs, test-pngtest.sh
|
||||||
contrib
|
contrib
|
||||||
gregbook
|
gregbook, libtests, pngminim, pngminus, pngsuite, visupng
|
||||||
libtests
|
|
||||||
pngminim
|
|
||||||
pngminus
|
|
||||||
pngsuite
|
|
||||||
visupng
|
|
||||||
projects
|
projects
|
||||||
visualc71
|
cbuilder5, owatcom, visualc71, vstudio, xcode
|
||||||
vstudio
|
|
||||||
scripts
|
scripts
|
||||||
makefile.*
|
makefile.*
|
||||||
*.def (module definition files)
|
*.def (module definition files)
|
||||||
@@ -100,29 +134,31 @@ Your directory structure should look like this:
|
|||||||
pngtest.png
|
pngtest.png
|
||||||
etc.
|
etc.
|
||||||
zlib
|
zlib
|
||||||
README
|
README, *.h, *.c contrib, etc.
|
||||||
*.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
|
||||||
endings) and zip (DOS style line endings) formats.
|
endings) and zip (DOS style line endings) formats.
|
||||||
|
|
||||||
|
VI. Building with project files
|
||||||
|
|
||||||
If you are building libpng with MSVC, you can enter the
|
If you are building libpng with MSVC, you can enter the
|
||||||
libpng projects\visualc6 or visualc71 directory and follow the instructions
|
libpng projects\visualc71 or vstudio directory and follow the instructions
|
||||||
in README.txt.
|
in README.txt.
|
||||||
|
|
||||||
Otherwise enter the zlib directory and follow the instructions in zlib/README,
|
Otherwise enter the zlib directory and follow the instructions in zlib/README,
|
||||||
then come back here and run "configure" or choose the appropriate
|
then come back here and run "configure" or choose the appropriate
|
||||||
makefile.sys in the scripts directory.
|
makefile.sys in the scripts directory.
|
||||||
|
|
||||||
|
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
|
MSDOS example: copy scripts\makefile.msc makefile
|
||||||
UNIX example: cp scripts/makefile.std makefile
|
copy scripts\pnglibconf.h.prebuilt pnglibconf.h
|
||||||
|
UNIX example: cp scripts/makefile.std makefile
|
||||||
|
cp scripts/pnglibconf.h.prebuilt pnglibconf.h
|
||||||
|
|
||||||
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.
|
||||||
@@ -145,6 +181,188 @@ do that, run "make install" in the zlib directory first if necessary).
|
|||||||
Some also allow you to run "make test-installed" after you have
|
Some also allow you to run "make test-installed" after you have
|
||||||
run "make install".
|
run "make install".
|
||||||
|
|
||||||
|
VIII. Configuring libpng for 16-bit platforms
|
||||||
|
|
||||||
|
You will want to look into zconf.h to tell zlib (and thus libpng) that
|
||||||
|
it cannot allocate more then 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
|
||||||
|
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.
|
||||||
|
|
||||||
|
X. Configuring for Medium Model
|
||||||
|
|
||||||
|
Libpng's support for medium model has been tested on most of the popular
|
||||||
|
compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
|
||||||
|
defined, and FAR gets defined to far in pngconf.h, and you should be
|
||||||
|
all set. Everything in the library (except for zlib's structure) is
|
||||||
|
expecting far data. You must use the typedefs with the p or pp on
|
||||||
|
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 *".
|
||||||
|
|
||||||
|
XI. Omitted
|
||||||
|
|
||||||
|
XII. Configuring for compiler xxx:
|
||||||
|
|
||||||
|
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.
|
||||||
|
The includes that are not needed outside libpng are placed in pngpriv.h,
|
||||||
|
which is only used by the routines inside libpng itself.
|
||||||
|
The files in libpng proper only include pngpriv.h and png.h, which
|
||||||
|
in turn includes pngconf.h and, as of libpng-1.5.0, pnglibconf.h.
|
||||||
|
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
|
||||||
|
that previously appeared in the public headers.
|
||||||
|
|
||||||
|
XIII. Removing unwanted object code
|
||||||
|
|
||||||
|
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
|
||||||
|
never going to use a capability, you can change the #define to #undef
|
||||||
|
before recompiling libpng and save yourself code and data space, or
|
||||||
|
you can turn off individual capabilities with defines that begin with
|
||||||
|
PNG_NO_.
|
||||||
|
|
||||||
|
In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead.
|
||||||
|
|
||||||
|
You can also turn all of the transforms and ancillary chunk capabilities
|
||||||
|
off en masse with compiler directives that define
|
||||||
|
PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
|
||||||
|
or all four, along with directives to turn on any of the capabilities that
|
||||||
|
you do want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the
|
||||||
|
extra transformations but still leave the library fully capable of reading
|
||||||
|
and writing PNG files with all known public chunks. Use of the
|
||||||
|
PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library
|
||||||
|
that is incapable of reading or writing ancillary chunks. If you are
|
||||||
|
not using the progressive reading capability, you can turn that off
|
||||||
|
with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING
|
||||||
|
capability, which you'll still have).
|
||||||
|
|
||||||
|
All the reading and writing specific code are in separate files, so the
|
||||||
|
linker should only grab the files it needs. However, if you want to
|
||||||
|
make sure, or if you are building a stand alone library, all the
|
||||||
|
reading files start with "pngr" and all the writing files start with "pngw".
|
||||||
|
The files that don't match either (like png.c, pngtrans.c, etc.)
|
||||||
|
are used for both reading and writing, and always need to be included.
|
||||||
|
The progressive reader is in pngpread.c
|
||||||
|
|
||||||
|
If you are creating or distributing a dynamically linked library (a .so
|
||||||
|
or DLL file), you should not remove or disable any parts of the library,
|
||||||
|
as this will cause applications linked with different versions of the
|
||||||
|
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
|
||||||
|
those sections that are actually used will be loaded into memory.
|
||||||
|
|
||||||
|
XIV. 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
|
||||||
|
file and in the GIT repository logs. These will be of no concern to the vast
|
||||||
|
majority of library users or builders; however, the few who configure libpng
|
||||||
|
to a non-default feature set may need to change how this is done.
|
||||||
|
|
||||||
|
There should be no need for library builders to alter build scripts if
|
||||||
|
these use the distributed build support - configure or the makefiles -
|
||||||
|
however, users of the makefiles may care to update their build scripts
|
||||||
|
to build pnglibconf.h where the corresponding makefile does not do so.
|
||||||
|
|
||||||
|
Building libpng with a non-default configuration has changed completely.
|
||||||
|
The old method using pngusr.h should still work correctly even though the
|
||||||
|
way pngusr.h is used in the build has been changed; however, library
|
||||||
|
builders will probably want to examine the changes to take advantage of
|
||||||
|
new capabilities and to simplify their build system.
|
||||||
|
|
||||||
|
A. Specific changes to library configuration capabilities
|
||||||
|
|
||||||
|
The exact mechanism used to control attributes of API functions has
|
||||||
|
changed. A single set of operating system independent macro definitions
|
||||||
|
is used and operating system specific directives are defined in
|
||||||
|
pnglibconf.h
|
||||||
|
|
||||||
|
As part of this the mechanism used to choose procedure call standards on
|
||||||
|
those systems that allow a choice has been changed. At present this only
|
||||||
|
affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
|
||||||
|
running on Intel processors. As before, PNGAPI is defined where required
|
||||||
|
to control the exported API functions; however, two new macros, PNGCBAPI
|
||||||
|
and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
|
||||||
|
(PNGCAPI) for functions that must match a C library prototype (currently
|
||||||
|
only png_longjmp_ptr, which must match the C longjmp function.) The new
|
||||||
|
approach is documented in pngconf.h
|
||||||
|
|
||||||
|
Despite these changes, libpng 1.5.0 only supports the native C function
|
||||||
|
calling standard on those platforms tested so far (__cdecl on Microsoft
|
||||||
|
Windows). This is because the support requirements for alternative
|
||||||
|
calling conventions seem to no longer exist. Developers who find it
|
||||||
|
necessary to set PNG_API_RULE to 1 should advise the mailing list
|
||||||
|
(png-mng-implement) of this and library builders who use Openwatcom and
|
||||||
|
therefore set PNG_API_RULE to 2 should also contact the mailing list.
|
||||||
|
|
||||||
|
B. Changes to the configuration mechanism
|
||||||
|
|
||||||
|
Prior to libpng-1.5.0 library builders who needed to configure libpng
|
||||||
|
had either to modify the exported pngconf.h header file to add system
|
||||||
|
specific configuration or had to write feature selection macros into
|
||||||
|
pngusr.h and cause this to be included into pngconf.h by defining
|
||||||
|
PNG_USER_CONFIG. The latter mechanism had the disadvantage that an
|
||||||
|
application built without PNG_USER_CONFIG defined would see the
|
||||||
|
unmodified, default, libpng API and thus would probably fail to link.
|
||||||
|
|
||||||
|
These mechanisms still work in the configure build and in any makefile
|
||||||
|
build that builds pnglibconf.h, although the feature selection macros
|
||||||
|
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
||||||
|
processed only once, at the time the exported header file pnglibconf.h is
|
||||||
|
built. pngconf.h no longer includes pngusr.h; therefore, pngusr.h is ignored
|
||||||
|
after the build of pnglibconf.h and it is never included in an application
|
||||||
|
build.
|
||||||
|
|
||||||
|
The formerly used alternative of adding a list of feature macros to the
|
||||||
|
CPPFLAGS setting in the build also still works; however, the macros will be
|
||||||
|
copied to pnglibconf.h and this may produce macro redefinition warnings
|
||||||
|
when the individual C files are compiled.
|
||||||
|
|
||||||
|
All configuration now only works if pnglibconf.h is built from
|
||||||
|
scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan
|
||||||
|
(the original author of awk) maintains C source code of that awk and this
|
||||||
|
and all known later implementations (often called by subtly different
|
||||||
|
names - nawk and gawk for example) are adequate to build pnglibconf.h.
|
||||||
|
The Sun Microsystems (now Oracle) program 'awk' is an earlier version
|
||||||
|
and does not work; this may also apply to other systems that have a
|
||||||
|
functioning awk called 'nawk'.
|
||||||
|
|
||||||
|
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
||||||
|
file also includes dependency information that ensures a configuration is
|
||||||
|
consistent; that is, if a feature is switched off, dependent features are
|
||||||
|
also switched off. As a recommended alternative to using feature macros in
|
||||||
|
pngusr.h a system builder may also define equivalent options in pngusr.dfa
|
||||||
|
(or, indeed, any file) and add that to the configuration by setting
|
||||||
|
DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate
|
||||||
|
how to do this, and also illustrate a case where pngusr.h is still required.
|
||||||
|
|
||||||
|
After you have built libpng, the definitions that were recorded in
|
||||||
|
pnglibconf.h are available to your application (pnglibconf.h is included
|
||||||
|
in png.h and gets installed alongside png.h and pngconf.h in your
|
||||||
|
$PREFIX/include directory). Do not edit pnglibconf.h after you have built
|
||||||
|
libpng, because than the settings would not accurately reflect the settings
|
||||||
|
that were used to build libpng.
|
||||||
|
|
||||||
|
XV. Configuring libpng for multiprocessing
|
||||||
|
|
||||||
|
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
|
||||||
|
any platform where it is guaranteed to be thread-safe. Therefore, if
|
||||||
|
your application is going to be using multiple threads, you should
|
||||||
|
configure libpng with PNG_NO_SETJMP in your pngusr.dfa file, with
|
||||||
|
-DPNG_NO_SETJMP on your compile line, or with
|
||||||
|
|
||||||
|
#undef PNG_SETJMP_SUPPORTED
|
||||||
|
|
||||||
|
in your pnglibconf.h or pngusr.h.
|
||||||
|
|
||||||
|
XVI. 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.
|
||||||
@@ -162,7 +380,7 @@ CFLAGS="-Wall -O -funroll-loops \
|
|||||||
--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include
|
--with-pkgconfigdir=/usr/lib/pkgconfig --includedir=/usr/include
|
||||||
|
|
||||||
You can alternatively specify --includedir=/usr/include, /usr/local/include,
|
You can alternatively specify --includedir=/usr/include, /usr/local/include,
|
||||||
/usr/include/libpng%NN%, or whatever.
|
/usr/include/libpng15, or whatever.
|
||||||
|
|
||||||
If you find that the configure script is out-of-date or is not supporting
|
If you find that the configure script is out-of-date or is not supporting
|
||||||
your platform properly, try running autogen.sh to regenerate "configure",
|
your platform properly, try running autogen.sh to regenerate "configure",
|
||||||
|
|||||||
6
LICENSE
6
LICENSE
@@ -10,8 +10,8 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.5.16, May 23, 2013, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.21, December 22, 2014, are
|
||||||
Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
|
|
||||||
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
May 23, 2013
|
December 22, 2014
|
||||||
|
|||||||
127
Makefile.am
127
Makefile.am
@@ -85,7 +85,7 @@ EXTRA_DIST= \
|
|||||||
$(TESTS) \
|
$(TESTS) \
|
||||||
CMakeLists.txt example.c libpng-manual.txt
|
CMakeLists.txt example.c libpng-manual.txt
|
||||||
|
|
||||||
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.dfn
|
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.c
|
||||||
|
|
||||||
CLEANFILES= dfn.c dfn?.out *.out.? scripts/*.out.? pngout.png \
|
CLEANFILES= dfn.c dfn?.out *.out.? scripts/*.out.? pngout.png \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
|
||||||
@@ -103,7 +103,7 @@ config.sub configure depcomp install-sh ltmain.sh missing
|
|||||||
# checks for this and sets DFNCPP appropriately.
|
# checks for this and sets DFNCPP appropriately.
|
||||||
DFNCPP = @DFNCPP@
|
DFNCPP = @DFNCPP@
|
||||||
|
|
||||||
SUFFIXES = .chk .dfn .out
|
SUFFIXES = .chk .out
|
||||||
|
|
||||||
$(PNGLIB_BASENAME).pc: libpng.pc
|
$(PNGLIB_BASENAME).pc: libpng.pc
|
||||||
cp libpng.pc $@
|
cp libpng.pc $@
|
||||||
@@ -142,17 +142,18 @@ 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
|
||||||
|
|
||||||
.dfn.out:
|
.c.out:
|
||||||
rm -f $@ $@.c $@.?
|
rm -f $@ $*.tf[12]
|
||||||
test -d scripts || mkdir scripts || test -d scripts
|
test -d scripts || mkdir scripts || test -d scripts
|
||||||
echo '#include "$<"' >$@.c
|
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\
|
||||||
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
$(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1
|
||||||
$(CPPFLAGS) $(SYMBOL_CFLAGS) $@.c > $@.1
|
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2
|
||||||
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$@.2" $@.1 1>&2
|
rm -f $*.tf1
|
||||||
mv $@.2 $@
|
mv $*.tf2 $@
|
||||||
|
|
||||||
|
# The .c file for pnglibconf.h is machine generated
|
||||||
|
pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
||||||
|
|
||||||
# The .dfn file for pnglibconf.h is machine generated
|
|
||||||
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
|
||||||
rm -f $@ pnglibconf.pre $@.?
|
rm -f $@ pnglibconf.pre $@.?
|
||||||
$(AWK) -f ${srcdir}/scripts/options.awk out="pnglibconf.pre"\
|
$(AWK) -f ${srcdir}/scripts/options.awk out="pnglibconf.pre"\
|
||||||
version=search ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
version=search ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
||||||
@@ -170,7 +171,7 @@ scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.ou
|
|||||||
|
|
||||||
# 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.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
||||||
rm -f $@ dfn?.out
|
rm -f $@ dfn?.out
|
||||||
test -z "$(CPPFLAGS)"
|
test -z "$(CPPFLAGS)"
|
||||||
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
||||||
@@ -193,40 +194,76 @@ check: scripts/symbols.chk
|
|||||||
dist-hook:
|
dist-hook:
|
||||||
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
|
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
|
||||||
|
|
||||||
# install the .../include headers as links to the new ones
|
# Make links between installed files with release-specific names and the generic
|
||||||
install-data-hook:
|
# file names. If this install rule is run the generic names will be deleted and
|
||||||
cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h
|
# recreated - this has obvious issues for systems with multiple installations.
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
|
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \
|
|
||||||
pngconf.h
|
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \
|
|
||||||
pnglibconf.h
|
|
||||||
cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc
|
|
||||||
cd '$(DESTDIR)$(pkgconfigdir)'; $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
|
||||||
|
|
||||||
# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used
|
install-header-links:
|
||||||
install-exec-hook:
|
@set -ex; cd '$(DESTDIR)$(includedir)'; for f in $(HEADERS); do \
|
||||||
cd '$(DESTDIR)$(bindir)'; rm -f libpng-config
|
rm -f "$$f"; $(LN_S) "$(PNGLIB_BASENAME)/$$f" "$$f"; done
|
||||||
cd '$(DESTDIR)$(bindir)';\
|
|
||||||
$(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
uninstall-header-links:
|
||||||
@set -x;\
|
cd '$(DESTDIR)$(includedir)'; rm -f $(HEADERS)
|
||||||
cd '$(DESTDIR)$(libdir)';\
|
|
||||||
for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@\
|
install-libpng-pc:
|
||||||
sl dylib dll.a; do\
|
@set -ex; cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc; \
|
||||||
rm -f libpng.$$ext;\
|
$(LN_S) '$(PNGLIB_BASENAME).pc' libpng.pc
|
||||||
if test -f $(PNGLIB_BASENAME).$$ext; then\
|
|
||||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
uninstall-libpng-pc:
|
||||||
fi;\
|
rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc'
|
||||||
|
|
||||||
|
# EXT_LIST is a list of the possibly library directory extensions, this exists
|
||||||
|
# because we can't find a good way of discovering the file extensions that are
|
||||||
|
# actually installed on a given system, so instead we check for every extension
|
||||||
|
# we have seen.
|
||||||
|
|
||||||
|
EXT_LIST = a dll.a so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ la sl dylib
|
||||||
|
|
||||||
|
install-library-links:
|
||||||
|
@set -x; cd '$(DESTDIR)$(libdir)';\
|
||||||
|
for ext in $(EXT_LIST); do\
|
||||||
|
rm -f "libpng.$$ext";\
|
||||||
|
if test -f "$(PNGLIB_BASENAME).$$ext"; then\
|
||||||
|
$(LN_S) "$(PNGLIB_BASENAME).$$ext" "libpng.$$ext" || exit 1;\
|
||||||
|
fi;\
|
||||||
done
|
done
|
||||||
|
|
||||||
uninstall-hook:
|
uninstall-library-links:
|
||||||
cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h
|
@set -x; cd '$(DESTDIR)$(libdir)'; for ext in $(EXT_LIST); do\
|
||||||
rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc'
|
rm -f "libpng.$$ext"; done
|
||||||
|
|
||||||
|
install-libpng-config:
|
||||||
|
@set -ex; cd '$(DESTDIR)$(bindir)'; rm -f libpng-config; \
|
||||||
|
$(LN_S) '$(PNGLIB_BASENAME)-config' libpng-config
|
||||||
|
|
||||||
|
uninstall-libpng-config:
|
||||||
rm -f '$(DESTDIR)$(bindir)/libpng-config'
|
rm -f '$(DESTDIR)$(bindir)/libpng-config'
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.a'
|
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.la'
|
if DO_INSTALL_LINKS
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.so'
|
# If --enable-unversioned-links is specified the header and lib file links
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@'
|
# will be automatically made on a 'make install':
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.sl'
|
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.dylib'
|
install-data-hook: install-header-links
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.dll.a'
|
uninstall-hook: uninstall-header-links
|
||||||
|
install-exec-hook: install-library-links
|
||||||
|
uninstall-hook: uninstall-library-links
|
||||||
|
endif
|
||||||
|
|
||||||
|
if DO_INSTALL_LIBPNG_PC
|
||||||
|
# Likewise, --install-pc causes libpng.pc to be constructed:
|
||||||
|
|
||||||
|
install-data-hook: install-libpng-pc
|
||||||
|
uninstall-hook: uninstall-libpng-pc
|
||||||
|
endif
|
||||||
|
|
||||||
|
if DO_INSTALL_LIBPNG_CONFIG
|
||||||
|
# And --install-config:
|
||||||
|
|
||||||
|
install-exec-hook: install-libpng-config
|
||||||
|
uninstall-hook: uninstall-libpng-config
|
||||||
|
endif
|
||||||
|
|
||||||
|
# The following addition ensures that 'make all' always builds the test programs
|
||||||
|
# too. It used to, but some change either in libpng or configure stopped this
|
||||||
|
# working.
|
||||||
|
all-am: $(check_PROGRAMS)
|
||||||
|
|||||||
314
Makefile.in
314
Makefile.in
@@ -1,7 +1,7 @@
|
|||||||
# Makefile.in generated by automake 1.13 from Makefile.am.
|
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -22,23 +22,51 @@
|
|||||||
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
am__make_dryrun = \
|
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||||
{ \
|
am__make_running_with_option = \
|
||||||
am__dry=no; \
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
case $$MAKEFLAGS in \
|
case $$MAKEFLAGS in \
|
||||||
*\\[\ \ ]*) \
|
*\\[\ \ ]*) \
|
||||||
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
|
bs=\\; \
|
||||||
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
*) \
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
for am__flg in $$MAKEFLAGS; do \
|
|
||||||
case $$am__flg in \
|
|
||||||
*=*|--*) ;; \
|
|
||||||
*n*) am__dry=yes; break;; \
|
|
||||||
esac; \
|
|
||||||
done;; \
|
|
||||||
esac; \
|
esac; \
|
||||||
test $$am__dry = yes; \
|
fi; \
|
||||||
}
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
pkglibdir = $(libdir)/@PACKAGE@
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
@@ -71,7 +99,7 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
|||||||
$(top_srcdir)/configure $(am__configure_deps) \
|
$(top_srcdir)/configure $(am__configure_deps) \
|
||||||
$(srcdir)/config.h.in $(srcdir)/libpng.pc.in \
|
$(srcdir)/config.h.in $(srcdir)/libpng.pc.in \
|
||||||
$(srcdir)/libpng-config.in depcomp $(dist_man_MANS) \
|
$(srcdir)/libpng-config.in depcomp $(dist_man_MANS) \
|
||||||
$(pkginclude_HEADERS) INSTALL README TODO config.guess \
|
$(pkginclude_HEADERS) INSTALL README TODO compile config.guess \
|
||||||
config.sub install-sh missing ltmain.sh
|
config.sub install-sh missing ltmain.sh
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
@@ -122,8 +150,9 @@ am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \
|
|||||||
pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \
|
pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \
|
||||||
pngpriv.h pngstruct.h pngusr.dfa arm/arm_init.c \
|
pngpriv.h pngstruct.h pngusr.dfa arm/arm_init.c \
|
||||||
arm/filter_neon.S
|
arm/filter_neon.S
|
||||||
@PNG_ARM_NEON_TRUE@am__objects_1 = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo \
|
am__dirstamp = $(am__leading_dot)dirstamp
|
||||||
@PNG_ARM_NEON_TRUE@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo
|
@PNG_ARM_NEON_TRUE@am__objects_1 = arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo \
|
||||||
|
@PNG_ARM_NEON_TRUE@ arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo
|
||||||
am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \
|
am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo \
|
||||||
@@ -157,7 +186,7 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
|
|||||||
am_pngtest_OBJECTS = pngtest.$(OBJEXT)
|
am_pngtest_OBJECTS = pngtest.$(OBJEXT)
|
||||||
pngtest_OBJECTS = $(am_pngtest_OBJECTS)
|
pngtest_OBJECTS = $(am_pngtest_OBJECTS)
|
||||||
pngtest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngtest_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
am_pngvalid_OBJECTS = pngvalid.$(OBJEXT)
|
am_pngvalid_OBJECTS = contrib/libtests/pngvalid.$(OBJEXT)
|
||||||
pngvalid_OBJECTS = $(am_pngvalid_OBJECTS)
|
pngvalid_OBJECTS = $(am_pngvalid_OBJECTS)
|
||||||
pngvalid_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
pngvalid_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
SCRIPTS = $(bin_SCRIPTS)
|
SCRIPTS = $(bin_SCRIPTS)
|
||||||
@@ -476,7 +505,7 @@ EXTRA_DIST = \
|
|||||||
$(TESTS) \
|
$(TESTS) \
|
||||||
CMakeLists.txt example.c libpng-manual.txt
|
CMakeLists.txt example.c libpng-manual.txt
|
||||||
|
|
||||||
SCRIPT_CLEANFILES = scripts/*.out scripts/*.chk scripts/pnglibconf.dfn
|
SCRIPT_CLEANFILES = scripts/*.out scripts/*.chk scripts/pnglibconf.c
|
||||||
CLEANFILES = dfn.c dfn?.out *.out.? scripts/*.out.? pngout.png \
|
CLEANFILES = dfn.c dfn?.out *.out.? scripts/*.out.? pngout.png \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
|
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 \
|
||||||
@@ -486,7 +515,7 @@ CLEANFILES = dfn.c dfn?.out *.out.? scripts/*.out.? pngout.png \
|
|||||||
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
|
||||||
|
|
||||||
SUFFIXES = .chk .dfn .out
|
SUFFIXES = .chk .out
|
||||||
|
|
||||||
# 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
|
||||||
@@ -496,11 +525,17 @@ 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
|
||||||
|
|
||||||
|
|
||||||
|
# EXT_LIST is a list of the possibly library directory extensions, this exists
|
||||||
|
# because we can't find a good way of discovering the file extensions that are
|
||||||
|
# actually installed on a given system, so instead we check for every extension
|
||||||
|
# we have seen.
|
||||||
|
EXT_LIST = a dll.a so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ la sl dylib
|
||||||
all: config.h
|
all: config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .chk .dfn .out .S .c .lo .o .obj
|
.SUFFIXES: .chk .out .S .c .lo .o .obj
|
||||||
am--refresh: Makefile
|
am--refresh: Makefile
|
||||||
@:
|
@:
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@@ -537,8 +572,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
|||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
config.h: stamp-h1
|
config.h: stamp-h1
|
||||||
@if test ! -f $@; then rm -f stamp-h1; else :; fi
|
@test -f $@ || rm -f stamp-h1
|
||||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
|
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||||
|
|
||||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||||
@rm -f stamp-h1
|
@rm -f stamp-h1
|
||||||
@@ -589,6 +624,17 @@ clean-libLTLIBRARIES:
|
|||||||
echo rm -f $${locs}; \
|
echo rm -f $${locs}; \
|
||||||
rm -f $${locs}; \
|
rm -f $${locs}; \
|
||||||
}
|
}
|
||||||
|
arm/$(am__dirstamp):
|
||||||
|
@$(MKDIR_P) arm
|
||||||
|
@: > arm/$(am__dirstamp)
|
||||||
|
arm/$(DEPDIR)/$(am__dirstamp):
|
||||||
|
@$(MKDIR_P) arm/$(DEPDIR)
|
||||||
|
@: > arm/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo: \
|
||||||
|
arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo: \
|
||||||
|
arm/$(am__dirstamp) arm/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES)
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la: $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES) $(EXTRA_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES)
|
||||||
$(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK) -rpath $(libdir) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD) $(LIBS)
|
$(AM_V_CCLD)$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LINK) -rpath $(libdir) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD) $(LIBS)
|
||||||
|
|
||||||
@@ -600,9 +646,19 @@ clean-checkPROGRAMS:
|
|||||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||||
echo " rm -f" $$list; \
|
echo " rm -f" $$list; \
|
||||||
rm -f $$list
|
rm -f $$list
|
||||||
|
|
||||||
pngtest$(EXEEXT): $(pngtest_OBJECTS) $(pngtest_DEPENDENCIES) $(EXTRA_pngtest_DEPENDENCIES)
|
pngtest$(EXEEXT): $(pngtest_OBJECTS) $(pngtest_DEPENDENCIES) $(EXTRA_pngtest_DEPENDENCIES)
|
||||||
@rm -f pngtest$(EXEEXT)
|
@rm -f pngtest$(EXEEXT)
|
||||||
$(AM_V_CCLD)$(LINK) $(pngtest_OBJECTS) $(pngtest_LDADD) $(LIBS)
|
$(AM_V_CCLD)$(LINK) $(pngtest_OBJECTS) $(pngtest_LDADD) $(LIBS)
|
||||||
|
contrib/libtests/$(am__dirstamp):
|
||||||
|
@$(MKDIR_P) contrib/libtests
|
||||||
|
@: > contrib/libtests/$(am__dirstamp)
|
||||||
|
contrib/libtests/$(DEPDIR)/$(am__dirstamp):
|
||||||
|
@$(MKDIR_P) contrib/libtests/$(DEPDIR)
|
||||||
|
@: > contrib/libtests/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
contrib/libtests/pngvalid.$(OBJEXT): contrib/libtests/$(am__dirstamp) \
|
||||||
|
contrib/libtests/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
|
||||||
pngvalid$(EXEEXT): $(pngvalid_OBJECTS) $(pngvalid_DEPENDENCIES) $(EXTRA_pngvalid_DEPENDENCIES)
|
pngvalid$(EXEEXT): $(pngvalid_OBJECTS) $(pngvalid_DEPENDENCIES) $(EXTRA_pngvalid_DEPENDENCIES)
|
||||||
@rm -f pngvalid$(EXEEXT)
|
@rm -f pngvalid$(EXEEXT)
|
||||||
$(AM_V_CCLD)$(LINK) $(pngvalid_OBJECTS) $(pngvalid_LDADD) $(LIBS)
|
$(AM_V_CCLD)$(LINK) $(pngvalid_OBJECTS) $(pngvalid_LDADD) $(LIBS)
|
||||||
@@ -644,12 +700,13 @@ uninstall-binSCRIPTS:
|
|||||||
|
|
||||||
mostlyclean-compile:
|
mostlyclean-compile:
|
||||||
-rm -f *.$(OBJEXT)
|
-rm -f *.$(OBJEXT)
|
||||||
|
-rm -f arm/*.$(OBJEXT)
|
||||||
|
-rm -f arm/*.lo
|
||||||
|
-rm -f contrib/libtests/*.$(OBJEXT)
|
||||||
|
|
||||||
distclean-compile:
|
distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.Plo@am__quote@
|
||||||
@@ -666,53 +723,61 @@ distclean-compile:
|
|||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngvalid.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@arm/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@contrib/libtests/$(DEPDIR)/pngvalid.Po@am__quote@
|
||||||
|
|
||||||
.S.o:
|
.S.o:
|
||||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||||
@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||||
|
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
|
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
.S.obj:
|
.S.obj:
|
||||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||||
@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||||
|
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
.S.lo:
|
.S.lo:
|
||||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||||
@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||||
|
@am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $<
|
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo: arm/filter_neon.S
|
arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo: arm/filter_neon.S
|
||||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo `test -f 'arm/filter_neon.S' || echo '$(srcdir)/'`arm/filter_neon.S
|
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo -MD -MP -MF arm/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Tpo -c -o arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo `test -f 'arm/filter_neon.S' || echo '$(srcdir)/'`arm/filter_neon.S
|
||||||
@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Plo
|
@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) arm/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Tpo arm/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Plo
|
||||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='arm/filter_neon.S' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo' libtool=yes @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='arm/filter_neon.S' object='arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo' libtool=yes @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo `test -f 'arm/filter_neon.S' || echo '$(srcdir)/'`arm/filter_neon.S
|
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo `test -f 'arm/filter_neon.S' || echo '$(srcdir)/'`arm/filter_neon.S
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||||
|
|
||||||
.c.obj:
|
.c.obj:
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
.c.lo:
|
.c.lo:
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||||
|
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||||
@@ -822,32 +887,19 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo: pngwutil.c
|
|||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo `test -f 'pngwutil.c' || echo '$(srcdir)/'`pngwutil.c
|
||||||
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo: arm/arm_init.c
|
arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo: arm/arm_init.c
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo `test -f 'arm/arm_init.c' || echo '$(srcdir)/'`arm/arm_init.c
|
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo -MD -MP -MF arm/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.Tpo -c -o arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo `test -f 'arm/arm_init.c' || echo '$(srcdir)/'`arm/arm_init.c
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.Plo
|
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) arm/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.Tpo arm/$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.Plo
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arm/arm_init.c' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo' libtool=yes @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arm/arm_init.c' object='arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo' libtool=yes @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo `test -f 'arm/arm_init.c' || echo '$(srcdir)/'`arm/arm_init.c
|
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o arm/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-arm_init.lo `test -f 'arm/arm_init.c' || echo '$(srcdir)/'`arm/arm_init.c
|
||||||
|
|
||||||
pngvalid.o: contrib/libtests/pngvalid.c
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngvalid.o -MD -MP -MF $(DEPDIR)/pngvalid.Tpo -c -o pngvalid.o `test -f 'contrib/libtests/pngvalid.c' || echo '$(srcdir)/'`contrib/libtests/pngvalid.c
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pngvalid.Tpo $(DEPDIR)/pngvalid.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='contrib/libtests/pngvalid.c' object='pngvalid.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngvalid.o `test -f 'contrib/libtests/pngvalid.c' || echo '$(srcdir)/'`contrib/libtests/pngvalid.c
|
|
||||||
|
|
||||||
pngvalid.obj: contrib/libtests/pngvalid.c
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pngvalid.obj -MD -MP -MF $(DEPDIR)/pngvalid.Tpo -c -o pngvalid.obj `if test -f 'contrib/libtests/pngvalid.c'; then $(CYGPATH_W) 'contrib/libtests/pngvalid.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngvalid.c'; fi`
|
|
||||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pngvalid.Tpo $(DEPDIR)/pngvalid.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='contrib/libtests/pngvalid.c' object='pngvalid.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pngvalid.obj `if test -f 'contrib/libtests/pngvalid.c'; then $(CYGPATH_W) 'contrib/libtests/pngvalid.c'; else $(CYGPATH_W) '$(srcdir)/contrib/libtests/pngvalid.c'; fi`
|
|
||||||
|
|
||||||
mostlyclean-libtool:
|
mostlyclean-libtool:
|
||||||
-rm -f *.lo
|
-rm -f *.lo
|
||||||
|
|
||||||
clean-libtool:
|
clean-libtool:
|
||||||
-rm -rf .libs _libs
|
-rm -rf .libs _libs
|
||||||
|
-rm -rf arm/.libs arm/_libs
|
||||||
|
|
||||||
distclean-libtool:
|
distclean-libtool:
|
||||||
-rm -f libtool config.lt
|
-rm -f libtool config.lt
|
||||||
@@ -1212,10 +1264,16 @@ dist-xz: distdir
|
|||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-tarZ: distdir
|
dist-tarZ: distdir
|
||||||
|
@echo WARNING: "Support for shar distribution archives is" \
|
||||||
|
"deprecated." >&2
|
||||||
|
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
dist-shar: distdir
|
dist-shar: distdir
|
||||||
|
@echo WARNING: "Support for distribution archives compressed with" \
|
||||||
|
"legacy program 'compress' is deprecated." >&2
|
||||||
|
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||||
$(am__post_remove_distdir)
|
$(am__post_remove_distdir)
|
||||||
|
|
||||||
@@ -1257,9 +1315,10 @@ distcheck: dist
|
|||||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
&& am__cwd=`pwd` \
|
&& am__cwd=`pwd` \
|
||||||
&& $(am__cd) $(distdir)/_build \
|
&& $(am__cd) $(distdir)/_build \
|
||||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
&& ../configure \
|
||||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
--srcdir=.. --prefix="$$dc_install_base" \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
@@ -1349,11 +1408,18 @@ clean-generic:
|
|||||||
distclean-generic:
|
distclean-generic:
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
-rm -f arm/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
-rm -f arm/$(am__dirstamp)
|
||||||
|
-rm -f contrib/libtests/$(DEPDIR)/$(am__dirstamp)
|
||||||
|
-rm -f contrib/libtests/$(am__dirstamp)
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||||
|
@DO_INSTALL_LIBPNG_CONFIG_FALSE@@DO_INSTALL_LINKS_FALSE@install-exec-hook:
|
||||||
|
@DO_INSTALL_LIBPNG_PC_FALSE@@DO_INSTALL_LINKS_FALSE@install-data-hook:
|
||||||
|
@DO_INSTALL_LIBPNG_CONFIG_FALSE@@DO_INSTALL_LIBPNG_PC_FALSE@@DO_INSTALL_LINKS_FALSE@uninstall-hook:
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
|
clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
|
||||||
@@ -1361,7 +1427,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
|
|||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
-rm -rf ./$(DEPDIR)
|
-rm -rf ./$(DEPDIR) arm/$(DEPDIR) contrib/libtests/$(DEPDIR)
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-compile distclean-generic \
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
distclean-hdr distclean-libtool distclean-tags
|
distclean-hdr distclean-libtool distclean-tags
|
||||||
@@ -1412,7 +1478,7 @@ installcheck-am:
|
|||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
-rm -rf $(top_srcdir)/autom4te.cache
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
-rm -rf ./$(DEPDIR)
|
-rm -rf ./$(DEPDIR) arm/$(DEPDIR) contrib/libtests/$(DEPDIR)
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
@@ -1493,17 +1559,18 @@ $(srcdir)/scripts/pnglibconf.h.prebuilt:
|
|||||||
# 'make test' is the first thing the user does.)
|
# 'make test' is the first thing the user does.)
|
||||||
contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
|
contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
|
||||||
|
|
||||||
.dfn.out:
|
.c.out:
|
||||||
rm -f $@ $@.c $@.?
|
rm -f $@ $*.tf[12]
|
||||||
test -d scripts || mkdir scripts || test -d scripts
|
test -d scripts || mkdir scripts || test -d scripts
|
||||||
echo '#include "$<"' >$@.c
|
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\
|
||||||
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
$(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1
|
||||||
$(CPPFLAGS) $(SYMBOL_CFLAGS) $@.c > $@.1
|
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2
|
||||||
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$@.2" $@.1 1>&2
|
rm -f $*.tf1
|
||||||
mv $@.2 $@
|
mv $*.tf2 $@
|
||||||
|
|
||||||
|
# The .c file for pnglibconf.h is machine generated
|
||||||
|
pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
||||||
|
|
||||||
# The .dfn file for pnglibconf.h is machine generated
|
|
||||||
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
|
||||||
rm -f $@ pnglibconf.pre $@.?
|
rm -f $@ pnglibconf.pre $@.?
|
||||||
$(AWK) -f ${srcdir}/scripts/options.awk out="pnglibconf.pre"\
|
$(AWK) -f ${srcdir}/scripts/options.awk out="pnglibconf.pre"\
|
||||||
version=search ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
version=search ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
||||||
@@ -1521,7 +1588,7 @@ scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.ou
|
|||||||
|
|
||||||
# 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.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
||||||
rm -f $@ dfn?.out
|
rm -f $@ dfn?.out
|
||||||
test -z "$(CPPFLAGS)"
|
test -z "$(CPPFLAGS)"
|
||||||
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
||||||
@@ -1544,43 +1611,66 @@ check: scripts/symbols.chk
|
|||||||
dist-hook:
|
dist-hook:
|
||||||
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
|
cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
|
||||||
|
|
||||||
# install the .../include headers as links to the new ones
|
# Make links between installed files with release-specific names and the generic
|
||||||
install-data-hook:
|
# file names. If this install rule is run the generic names will be deleted and
|
||||||
cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h
|
# recreated - this has obvious issues for systems with multiple installations.
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
|
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \
|
|
||||||
pngconf.h
|
|
||||||
cd '$(DESTDIR)$(includedir)'; $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \
|
|
||||||
pnglibconf.h
|
|
||||||
cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc
|
|
||||||
cd '$(DESTDIR)$(pkgconfigdir)'; $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
|
||||||
|
|
||||||
# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used
|
install-header-links:
|
||||||
install-exec-hook:
|
@set -ex; cd '$(DESTDIR)$(includedir)'; for f in $(HEADERS); do \
|
||||||
cd '$(DESTDIR)$(bindir)'; rm -f libpng-config
|
rm -f "$$f"; $(LN_S) "$(PNGLIB_BASENAME)/$$f" "$$f"; done
|
||||||
cd '$(DESTDIR)$(bindir)';\
|
|
||||||
$(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
uninstall-header-links:
|
||||||
@set -x;\
|
cd '$(DESTDIR)$(includedir)'; rm -f $(HEADERS)
|
||||||
cd '$(DESTDIR)$(libdir)';\
|
|
||||||
for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@\
|
install-libpng-pc:
|
||||||
sl dylib dll.a; do\
|
@set -ex; cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc; \
|
||||||
rm -f libpng.$$ext;\
|
$(LN_S) '$(PNGLIB_BASENAME).pc' libpng.pc
|
||||||
if test -f $(PNGLIB_BASENAME).$$ext; then\
|
|
||||||
$(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
|
uninstall-libpng-pc:
|
||||||
fi;\
|
rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc'
|
||||||
|
|
||||||
|
install-library-links:
|
||||||
|
@set -x; cd '$(DESTDIR)$(libdir)';\
|
||||||
|
for ext in $(EXT_LIST); do\
|
||||||
|
rm -f "libpng.$$ext";\
|
||||||
|
if test -f "$(PNGLIB_BASENAME).$$ext"; then\
|
||||||
|
$(LN_S) "$(PNGLIB_BASENAME).$$ext" "libpng.$$ext" || exit 1;\
|
||||||
|
fi;\
|
||||||
done
|
done
|
||||||
|
|
||||||
uninstall-hook:
|
uninstall-library-links:
|
||||||
cd '$(DESTDIR)$(includedir)'; rm -f png.h pngconf.h pnglibconf.h
|
@set -x; cd '$(DESTDIR)$(libdir)'; for ext in $(EXT_LIST); do\
|
||||||
rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc'
|
rm -f "libpng.$$ext"; done
|
||||||
|
|
||||||
|
install-libpng-config:
|
||||||
|
@set -ex; cd '$(DESTDIR)$(bindir)'; rm -f libpng-config; \
|
||||||
|
$(LN_S) '$(PNGLIB_BASENAME)-config' libpng-config
|
||||||
|
|
||||||
|
uninstall-libpng-config:
|
||||||
rm -f '$(DESTDIR)$(bindir)/libpng-config'
|
rm -f '$(DESTDIR)$(bindir)/libpng-config'
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.a'
|
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.la'
|
# If --enable-unversioned-links is specified the header and lib file links
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.so'
|
# will be automatically made on a 'make install':
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@'
|
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.sl'
|
@DO_INSTALL_LINKS_TRUE@install-data-hook: install-header-links
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.dylib'
|
@DO_INSTALL_LINKS_TRUE@uninstall-hook: uninstall-header-links
|
||||||
rm -f '$(DESTDIR)$(libdir)/libpng.dll.a'
|
@DO_INSTALL_LINKS_TRUE@install-exec-hook: install-library-links
|
||||||
|
@DO_INSTALL_LINKS_TRUE@uninstall-hook: uninstall-library-links
|
||||||
|
|
||||||
|
# Likewise, --install-pc causes libpng.pc to be constructed:
|
||||||
|
|
||||||
|
@DO_INSTALL_LIBPNG_PC_TRUE@install-data-hook: install-libpng-pc
|
||||||
|
@DO_INSTALL_LIBPNG_PC_TRUE@uninstall-hook: uninstall-libpng-pc
|
||||||
|
|
||||||
|
# And --install-config:
|
||||||
|
|
||||||
|
@DO_INSTALL_LIBPNG_CONFIG_TRUE@install-exec-hook: install-libpng-config
|
||||||
|
@DO_INSTALL_LIBPNG_CONFIG_TRUE@uninstall-hook: uninstall-libpng-config
|
||||||
|
|
||||||
|
# The following addition ensures that 'make all' always builds the test programs
|
||||||
|
# too. It used to, but some change either in libpng or configure stopped this
|
||||||
|
# working.
|
||||||
|
all-am: $(check_PROGRAMS)
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|||||||
61
README
61
README
@@ -1,11 +1,11 @@
|
|||||||
README for libpng version 1.5.16 - May 23, 2013 (shared library 15.0)
|
README for libpng version 1.5.21 - December 22, 2014 (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
|
||||||
libpng-*.tar.xz or libpng-*.tar.bz2 if you want UNIX-style line endings
|
libpng-*.tar.xz or if you want UNIX-style line endings in the text files,
|
||||||
in the text files, or lpng*.zip if you want DOS-style line endings.
|
or lpng*.7z or lpng*.zip if you want DOS-style line endings.
|
||||||
|
|
||||||
Version 0.89 was the first official release of libpng. Don't let the
|
Version 0.89 was the first official release of libpng. Don't let the
|
||||||
fact that it's the first release fool you. The libpng library has been in
|
fact that it's the first release fool you. The libpng library has been in
|
||||||
@@ -23,18 +23,25 @@ earlier versions if you are using a shared library. The type of the
|
|||||||
png_uint_32, which will affect shared-library applications that use
|
png_uint_32, which will affect shared-library applications that use
|
||||||
this function.
|
this function.
|
||||||
|
|
||||||
To avoid problems with changes to the internals of png_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 do 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. However, it is strongly suggested that new programs use
|
library, through libpng-1.2.x. In libpng-1.4.x, which was meant to
|
||||||
the new APIs (as shown in example.c and pngtest.c), and older programs
|
be a transitional release, members of the png_struct and the
|
||||||
be converted to the new format, to facilitate upgrades in the future.
|
info_struct can still be accessed, but the compiler will issue a
|
||||||
|
warning about deprecated usage. Since libpng-1.5.0, direct access
|
||||||
|
to these structs is not allowed, and the definitions of the structs
|
||||||
|
reside in private pngstruct.h and pnginfo.h header files that are not
|
||||||
|
accessible to applications. It is strongly suggested that new
|
||||||
|
programs use the new APIs (as shown in example.c and pngtest.c), and
|
||||||
|
older programs be converted to the new format, to facilitate upgrades
|
||||||
|
in the future.
|
||||||
****
|
****
|
||||||
|
|
||||||
Additions since 0.90 include the ability to compile libpng as a
|
Additions since 0.90 include the ability to compile libpng as a
|
||||||
@@ -77,17 +84,21 @@ 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 can use zlib as a drop-in replacement for fread() and fwrite() if
|
||||||
you are so inclined.
|
you are so inclined.
|
||||||
|
|
||||||
zlib should be available at the same place that libpng is, or at.
|
zlib should be available at the same place that libpng is, or at zlib.net.
|
||||||
ftp://ftp.info-zip.org/pub/infozip/zlib
|
|
||||||
|
|
||||||
You may also want a copy of the PNG specification. It is available
|
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
|
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
|
||||||
these at http://www.libpng.org/pub/png/documents/
|
these at http://www.libpng.org/pub/png/documents/
|
||||||
|
|
||||||
This code is currently being archived at libpng.sf.net in the
|
This code is currently being archived at libpng.sf.net in the
|
||||||
[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT)
|
[DOWNLOAD] area, and at ftp://ftp.simplesystems.org. If you can't find it
|
||||||
at GO GRAPHSUP. If you can't find it in any of those places,
|
in any of those places, e-mail me, and I'll help you find it.
|
||||||
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
|
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,
|
them to me. Also, I'd appreciate any make files or project files,
|
||||||
@@ -105,7 +116,7 @@ based in a large way on Guy's and Andreas' earlier work), and the PNG
|
|||||||
development group.
|
development group.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at
|
Send comments/corrections/commendations to png-mng-implement at
|
||||||
lists.sourceforge.net (subscription required; visit
|
lists.sourceforge.net (subscription required; visit
|
||||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||||
to subscribe) or to glennrp at users.sourceforge.net
|
to subscribe) or to glennrp at users.sourceforge.net
|
||||||
|
|
||||||
@@ -123,7 +134,7 @@ and ...". If in doubt, send questions to me. I'll bounce them
|
|||||||
to others, if necessary.
|
to others, if necessary.
|
||||||
|
|
||||||
Please do not send suggestions on how to change PNG. We have
|
Please do not send suggestions on how to change PNG. We have
|
||||||
been discussing PNG for sixteen years now, and it is official and
|
been discussing PNG for nineteen years now, and it is official and
|
||||||
finished. If you have suggestions for libpng, however, I'll
|
finished. If you have suggestions for libpng, however, I'll
|
||||||
gladly listen. Even if your suggestion is not used immediately,
|
gladly listen. Even if your suggestion is not used immediately,
|
||||||
it may be used later.
|
it may be used later.
|
||||||
@@ -167,23 +178,23 @@ Files in this distribution:
|
|||||||
pngwrite.c => High-level write functions
|
pngwrite.c => High-level write functions
|
||||||
pngwtran.c => Write data transformations
|
pngwtran.c => Write data transformations
|
||||||
pngwutil.c => Write utility functions
|
pngwutil.c => Write utility functions
|
||||||
|
arm => Contains optimized code for the ARM platform
|
||||||
contrib => Contributions
|
contrib => Contributions
|
||||||
gregbook => source code for PNG reading and writing, from
|
gregbook => source code for PNG reading and writing, from
|
||||||
Greg Roelofs' "PNG: The Definitive Guide",
|
Greg Roelofs' "PNG: The Definitive Guide",
|
||||||
O'Reilly, 1999
|
O'Reilly, 1999
|
||||||
msvctest => Builds and runs pngtest using a MSVC workspace
|
libtests => Test programs
|
||||||
pngminus => Simple pnm2png and png2pnm programs
|
pngminim => Minimal decoder, encoder, and progressive decoder
|
||||||
pngsuite => Test images
|
programs demonstrating use of pngusr.dfa
|
||||||
visupng => Contains a MSVC workspace for VisualPng
|
pngminus => Simple pnm2png and png2pnm programs
|
||||||
|
pngsuite => Test images
|
||||||
|
visupng => Contains a MSVC workspace for VisualPng
|
||||||
projects => Contains project files and workspaces for
|
projects => Contains project files and workspaces for
|
||||||
building a DLL
|
building a DLL
|
||||||
cbuilder5 => Contains a Borland workspace for building
|
owatcom => Contains a WATCOM project for building libpng
|
||||||
libpng and zlib
|
|
||||||
visualc6 => Contains a Microsoft Visual C++ (MSVC)
|
|
||||||
workspace for building libpng and zlib
|
|
||||||
visualc71 => Contains a Microsoft Visual C++ (MSVC)
|
visualc71 => Contains a Microsoft Visual C++ (MSVC)
|
||||||
workspace for building libpng and zlib
|
workspace for building libpng and zlib
|
||||||
xcode => Contains an Apple xcode
|
vstudio => Contains a Microsoft Visual C++ (MSVC)
|
||||||
workspace for building libpng and zlib
|
workspace for building libpng and zlib
|
||||||
scripts => Directory containing scripts for building libpng:
|
scripts => Directory containing scripts for building libpng:
|
||||||
(see scripts/README.txt for the list of scripts)
|
(see scripts/README.txt for the list of scripts)
|
||||||
|
|||||||
1
TODO
1
TODO
@@ -6,6 +6,7 @@ Better C++ wrapper/full C++ implementation?
|
|||||||
Fix problem with C++ and EXTERN "C".
|
Fix problem with C++ and EXTERN "C".
|
||||||
cHRM transformation.
|
cHRM transformation.
|
||||||
Remove setjmp/longjmp usage in favor of returning error codes.
|
Remove setjmp/longjmp usage in favor of returning error codes.
|
||||||
|
Palette creation.
|
||||||
Add "grayscale->palette" transformation and "palette->grayscale" detection.
|
Add "grayscale->palette" transformation and "palette->grayscale" detection.
|
||||||
Improved dithering.
|
Improved dithering.
|
||||||
Multi-lingual error and warning message support.
|
Multi-lingual error and warning message support.
|
||||||
|
|||||||
322
aclocal.m4
vendored
322
aclocal.m4
vendored
@@ -1,6 +1,6 @@
|
|||||||
# generated automatically by aclocal 1.13 -*- Autoconf -*-
|
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -8607,7 +8607,7 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
|||||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
||||||
|
|
||||||
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -8619,10 +8619,10 @@ m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
|||||||
# generated from the m4 files accompanying Automake X.Y.
|
# generated from the m4 files accompanying Automake X.Y.
|
||||||
# (This private macro should not be called outside this file.)
|
# (This private macro should not be called outside this file.)
|
||||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||||
[am__api_version='1.13'
|
[am__api_version='1.14'
|
||||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||||
dnl require some minimum version. Point them to the right macro.
|
dnl require some minimum version. Point them to the right macro.
|
||||||
m4_if([$1], [1.13], [],
|
m4_if([$1], [1.14.1], [],
|
||||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -8638,14 +8638,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
|||||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
[AM_AUTOMAKE_VERSION([1.13])dnl
|
[AM_AUTOMAKE_VERSION([1.14.1])dnl
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
|
|
||||||
# Figure out how to run the assembler. -*- Autoconf -*-
|
# Figure out how to run the assembler. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -8665,7 +8665,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
|
|||||||
|
|
||||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -8718,7 +8718,7 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
|
|||||||
|
|
||||||
# AM_CONDITIONAL -*- Autoconf -*-
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -8749,7 +8749,7 @@ AC_CONFIG_COMMANDS_PRE(
|
|||||||
Usually this means the macro was only invoked conditionally.]])
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
fi])])
|
fi])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -8940,7 +8940,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
|
|||||||
|
|
||||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -8980,7 +8980,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||||
test -z "$DEPDIR" && continue
|
test -z "$DEPDIR" && continue
|
||||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||||
test -z "am__include" && continue
|
test -z "$am__include" && continue
|
||||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||||
# Find all dependency output files, they are included files with
|
# Find all dependency output files, they are included files with
|
||||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||||
@@ -9016,7 +9016,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
|
|
||||||
# Do all the work for Automake. -*- Autoconf -*-
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9025,6 +9025,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||||||
# This macro actually does too much. Some checks are only needed if
|
# This macro actually does too much. Some checks are only needed if
|
||||||
# your package does certain things. But this isn't really a big deal.
|
# your package does certain things. But this isn't really a big deal.
|
||||||
|
|
||||||
|
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
|
||||||
|
m4_define([AC_PROG_CC],
|
||||||
|
m4_defn([AC_PROG_CC])
|
||||||
|
[_AM_PROG_CC_C_O
|
||||||
|
])
|
||||||
|
|
||||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||||
# -----------------------------------------------
|
# -----------------------------------------------
|
||||||
@@ -9133,7 +9139,48 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
|||||||
AC_CONFIG_COMMANDS_PRE(dnl
|
AC_CONFIG_COMMANDS_PRE(dnl
|
||||||
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
||||||
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
||||||
])
|
|
||||||
|
# POSIX will say in a future version that running "rm -f" with no argument
|
||||||
|
# is OK; and we want to be able to make that assumption in our Makefile
|
||||||
|
# recipes. So use an aggressive probe to check that the usage we want is
|
||||||
|
# actually supported "in the wild" to an acceptable degree.
|
||||||
|
# See automake bug#10828.
|
||||||
|
# To make any issue more visible, cause the running configure to be aborted
|
||||||
|
# by default if the 'rm' program in use doesn't match our expectations; the
|
||||||
|
# user can still override this though.
|
||||||
|
if rm -f && rm -fr && rm -rf; then : OK; else
|
||||||
|
cat >&2 <<'END'
|
||||||
|
Oops!
|
||||||
|
|
||||||
|
Your 'rm' program seems unable to run without file operands specified
|
||||||
|
on the command line, even when the '-f' option is present. This is contrary
|
||||||
|
to the behaviour of most rm programs out there, and not conforming with
|
||||||
|
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
||||||
|
|
||||||
|
Please tell bug-automake@gnu.org about your system, including the value
|
||||||
|
of your $PATH and any error possibly output before this message. This
|
||||||
|
can help us improve future automake versions.
|
||||||
|
|
||||||
|
END
|
||||||
|
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
||||||
|
echo 'Configuration will proceed anyway, since you have set the' >&2
|
||||||
|
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
||||||
|
echo >&2
|
||||||
|
else
|
||||||
|
cat >&2 <<'END'
|
||||||
|
Aborting the configuration process, to ensure you take notice of the issue.
|
||||||
|
|
||||||
|
You can download and install GNU coreutils to get an 'rm' implementation
|
||||||
|
that behaves properly: <http://www.gnu.org/software/coreutils/>.
|
||||||
|
|
||||||
|
If you want to complete the configuration process using your problematic
|
||||||
|
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
||||||
|
to "yes", and re-run configure.
|
||||||
|
|
||||||
|
END
|
||||||
|
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
|
||||||
|
fi
|
||||||
|
fi])
|
||||||
|
|
||||||
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
||||||
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
||||||
@@ -9141,7 +9188,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
|
|||||||
m4_define([_AC_COMPILER_EXEEXT],
|
m4_define([_AC_COMPILER_EXEEXT],
|
||||||
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
||||||
|
|
||||||
|
|
||||||
# When config.status generates a header, we must update the stamp-h file.
|
# When config.status generates a header, we must update the stamp-h file.
|
||||||
# This file resides in the same directory as the config header
|
# This file resides in the same directory as the config header
|
||||||
# that is generated. The stamp files are numbered to have different names.
|
# that is generated. The stamp files are numbered to have different names.
|
||||||
@@ -9163,7 +9209,7 @@ for _am_header in $config_headers :; do
|
|||||||
done
|
done
|
||||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9184,7 +9230,7 @@ if test x"${install_sh}" != xset; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST([install_sh])])
|
AC_SUBST([install_sh])])
|
||||||
|
|
||||||
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9206,7 +9252,7 @@ AC_SUBST([am__leading_dot])])
|
|||||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||||
# From Jim Meyering
|
# From Jim Meyering
|
||||||
|
|
||||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9241,7 +9287,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
|||||||
|
|
||||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9291,7 +9337,7 @@ rm -f confinc confmf
|
|||||||
|
|
||||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9330,7 +9376,7 @@ fi
|
|||||||
|
|
||||||
# Helper functions for option handling. -*- Autoconf -*-
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9359,9 +9405,73 @@ AC_DEFUN([_AM_SET_OPTIONS],
|
|||||||
AC_DEFUN([_AM_IF_OPTION],
|
AC_DEFUN([_AM_IF_OPTION],
|
||||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# _AM_PROG_CC_C_O
|
||||||
|
# ---------------
|
||||||
|
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
|
||||||
|
# to automatically call this.
|
||||||
|
AC_DEFUN([_AM_PROG_CC_C_O],
|
||||||
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||||
|
AC_REQUIRE_AUX_FILE([compile])dnl
|
||||||
|
AC_LANG_PUSH([C])dnl
|
||||||
|
AC_CACHE_CHECK(
|
||||||
|
[whether $CC understands -c and -o together],
|
||||||
|
[am_cv_prog_cc_c_o],
|
||||||
|
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
|
||||||
|
# Make sure it works both with $CC and with simple cc.
|
||||||
|
# Following AC_PROG_CC_C_O, we do the test twice because some
|
||||||
|
# compilers refuse to overwrite an existing .o file with -o,
|
||||||
|
# though they will create one.
|
||||||
|
am_cv_prog_cc_c_o=yes
|
||||||
|
for am_i in 1 2; do
|
||||||
|
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
|
||||||
|
&& test -f conftest2.$ac_objext; then
|
||||||
|
: OK
|
||||||
|
else
|
||||||
|
am_cv_prog_cc_c_o=no
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm -f core conftest*
|
||||||
|
unset am_i])
|
||||||
|
if test "$am_cv_prog_cc_c_o" != yes; then
|
||||||
|
# Losing compiler, so override with the script.
|
||||||
|
# FIXME: It is wrong to rewrite CC.
|
||||||
|
# But if we don't then we get into trouble of one sort or another.
|
||||||
|
# A longer-term fix would be to have automake use am__CC in this case,
|
||||||
|
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||||
|
CC="$am_aux_dir/compile $CC"
|
||||||
|
fi
|
||||||
|
AC_LANG_POP([C])])
|
||||||
|
|
||||||
|
# For backward compatibility.
|
||||||
|
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
||||||
|
|
||||||
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# AM_RUN_LOG(COMMAND)
|
||||||
|
# -------------------
|
||||||
|
# Run COMMAND, save the exit status in ac_status, and log it.
|
||||||
|
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
|
||||||
|
AC_DEFUN([AM_RUN_LOG],
|
||||||
|
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
||||||
|
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
||||||
|
(exit $ac_status); }])
|
||||||
|
|
||||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9442,7 +9552,7 @@ AC_CONFIG_COMMANDS_PRE(
|
|||||||
rm -f conftest.file
|
rm -f conftest.file
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9502,7 +9612,7 @@ AC_SUBST([AM_BACKSLASH])dnl
|
|||||||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9530,7 +9640,7 @@ fi
|
|||||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9549,7 +9659,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
|||||||
|
|
||||||
# Check how to create a tarball. -*- Autoconf -*-
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2004-2013 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -9568,76 +9678,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
|||||||
# Substitute a variable $(am__untar) that extract such
|
# Substitute a variable $(am__untar) that extract such
|
||||||
# a tarball read from stdin.
|
# a tarball read from stdin.
|
||||||
# $(am__untar) < result.tar
|
# $(am__untar) < result.tar
|
||||||
|
#
|
||||||
AC_DEFUN([_AM_PROG_TAR],
|
AC_DEFUN([_AM_PROG_TAR],
|
||||||
[# Always define AMTAR for backward compatibility. Yes, it's still used
|
[# Always define AMTAR for backward compatibility. Yes, it's still used
|
||||||
# in the wild :-( We should find a proper way to deprecate it ...
|
# in the wild :-( We should find a proper way to deprecate it ...
|
||||||
AC_SUBST([AMTAR], ['$${TAR-tar}'])
|
AC_SUBST([AMTAR], ['$${TAR-tar}'])
|
||||||
m4_if([$1], [v7],
|
|
||||||
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
|
# We'll loop over all known methods to create a tar archive until one works.
|
||||||
[m4_case([$1], [ustar],, [pax],,
|
|
||||||
[m4_fatal([Unknown tar format])])
|
|
||||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
|
||||||
# Loop over all known methods to create a tar archive until one works.
|
|
||||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
|
||||||
# Do not fold the above two line into one, because Tru64 sh and
|
|
||||||
# Solaris sh will not grok spaces in the rhs of '-'.
|
|
||||||
for _am_tool in $_am_tools
|
|
||||||
do
|
|
||||||
case $_am_tool in
|
|
||||||
gnutar)
|
|
||||||
for _am_tar in tar gnutar gtar;
|
|
||||||
do
|
|
||||||
AM_RUN_LOG([$_am_tar --version]) && break
|
|
||||||
done
|
|
||||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
|
||||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
|
||||||
am__untar="$_am_tar -xf -"
|
|
||||||
;;
|
|
||||||
plaintar)
|
|
||||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
|
||||||
# ustar tarball either.
|
|
||||||
(tar --version) >/dev/null 2>&1 && continue
|
|
||||||
am__tar='tar chf - "$$tardir"'
|
|
||||||
am__tar_='tar chf - "$tardir"'
|
|
||||||
am__untar='tar xf -'
|
|
||||||
;;
|
|
||||||
pax)
|
|
||||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
|
||||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
|
||||||
am__untar='pax -r'
|
|
||||||
;;
|
|
||||||
cpio)
|
|
||||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
|
||||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
|
||||||
am__untar='cpio -i -H $1 -d'
|
|
||||||
;;
|
|
||||||
none)
|
|
||||||
am__tar=false
|
|
||||||
am__tar_=false
|
|
||||||
am__untar=false
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# If the value was cached, stop now. We just wanted to have am__tar
|
m4_if([$1], [v7],
|
||||||
# and am__untar set.
|
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
|
||||||
test -n "${am_cv_prog_tar_$1}" && break
|
|
||||||
|
|
||||||
# tar/untar a dummy directory, and stop if the command works
|
[m4_case([$1],
|
||||||
|
[ustar],
|
||||||
|
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
|
||||||
|
# There is notably a 21 bits limit for the UID and the GID. In fact,
|
||||||
|
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
|
||||||
|
# and bug#13588).
|
||||||
|
am_max_uid=2097151 # 2^21 - 1
|
||||||
|
am_max_gid=$am_max_uid
|
||||||
|
# The $UID and $GID variables are not portable, so we need to resort
|
||||||
|
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
|
||||||
|
# below are definitely unexpected, so allow the users to see them
|
||||||
|
# (that is, avoid stderr redirection).
|
||||||
|
am_uid=`id -u || echo unknown`
|
||||||
|
am_gid=`id -g || echo unknown`
|
||||||
|
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
|
||||||
|
if test $am_uid -le $am_max_uid; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
_am_tools=none
|
||||||
|
fi
|
||||||
|
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
|
||||||
|
if test $am_gid -le $am_max_gid; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
_am_tools=none
|
||||||
|
fi],
|
||||||
|
|
||||||
|
[pax],
|
||||||
|
[],
|
||||||
|
|
||||||
|
[m4_fatal([Unknown tar format])])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||||
|
|
||||||
|
# Go ahead even if we have the value already cached. We do so because we
|
||||||
|
# need to set the values for the 'am__tar' and 'am__untar' variables.
|
||||||
|
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||||
|
|
||||||
|
for _am_tool in $_am_tools; do
|
||||||
|
case $_am_tool in
|
||||||
|
gnutar)
|
||||||
|
for _am_tar in tar gnutar gtar; do
|
||||||
|
AM_RUN_LOG([$_am_tar --version]) && break
|
||||||
|
done
|
||||||
|
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||||
|
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||||
|
am__untar="$_am_tar -xf -"
|
||||||
|
;;
|
||||||
|
plaintar)
|
||||||
|
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||||
|
# ustar tarball either.
|
||||||
|
(tar --version) >/dev/null 2>&1 && continue
|
||||||
|
am__tar='tar chf - "$$tardir"'
|
||||||
|
am__tar_='tar chf - "$tardir"'
|
||||||
|
am__untar='tar xf -'
|
||||||
|
;;
|
||||||
|
pax)
|
||||||
|
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||||
|
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||||
|
am__untar='pax -r'
|
||||||
|
;;
|
||||||
|
cpio)
|
||||||
|
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||||
|
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||||
|
am__untar='cpio -i -H $1 -d'
|
||||||
|
;;
|
||||||
|
none)
|
||||||
|
am__tar=false
|
||||||
|
am__tar_=false
|
||||||
|
am__untar=false
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If the value was cached, stop now. We just wanted to have am__tar
|
||||||
|
# and am__untar set.
|
||||||
|
test -n "${am_cv_prog_tar_$1}" && break
|
||||||
|
|
||||||
|
# tar/untar a dummy directory, and stop if the command works.
|
||||||
|
rm -rf conftest.dir
|
||||||
|
mkdir conftest.dir
|
||||||
|
echo GrepMe > conftest.dir/file
|
||||||
|
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||||
|
rm -rf conftest.dir
|
||||||
|
if test -s conftest.tar; then
|
||||||
|
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||||
|
AM_RUN_LOG([cat conftest.dir/file])
|
||||||
|
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||||
|
fi
|
||||||
|
done
|
||||||
rm -rf conftest.dir
|
rm -rf conftest.dir
|
||||||
mkdir conftest.dir
|
|
||||||
echo GrepMe > conftest.dir/file
|
|
||||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
|
||||||
rm -rf conftest.dir
|
|
||||||
if test -s conftest.tar; then
|
|
||||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
|
||||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rm -rf conftest.dir
|
|
||||||
|
|
||||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||||
|
|
||||||
AC_SUBST([am__tar])
|
AC_SUBST([am__tar])
|
||||||
AC_SUBST([am__untar])
|
AC_SUBST([am__untar])
|
||||||
]) # _AM_PROG_TAR
|
]) # _AM_PROG_TAR
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
* Last changed in libpng 1.5.16 [May 23, 2013]
|
* 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
|
||||||
@@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
|
|
||||||
#ifdef PNG_ARM_NEON_SUPPORTED
|
#ifdef PNG_READ_SUPPORTED
|
||||||
|
#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 */
|
||||||
#include <signal.h> /* for sig_atomic_t */
|
#include <signal.h> /* for sig_atomic_t */
|
||||||
|
|
||||||
@@ -89,7 +90,7 @@ safe_read(png_structp png_ptr, int fd, void *buffer_in, size_t nbytes)
|
|||||||
if (errno != EINTR)
|
if (errno != EINTR)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "/proc read failed");
|
png_warning(png_ptr, "/proc read failed");
|
||||||
return 0; /* I.e. a permanent failure */
|
return 0; /* I.e., a permanent failure */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,6 +154,16 @@ png_have_neon(png_structp png_ptr)
|
|||||||
void
|
void
|
||||||
png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
||||||
{
|
{
|
||||||
|
/* The switch statement is compiled in for ARM_NEON_API, the call to
|
||||||
|
* png_have_neon is compiled in for ARM_NEON_CHECK. If both are defined
|
||||||
|
* the check is only performed if the API has not set the NEON option on
|
||||||
|
* or off explicitly. In this case the check controls what happens.
|
||||||
|
*
|
||||||
|
* If the CHECK is not compiled in and the option is UNSET the behavior prior
|
||||||
|
* to 1.6.7 was to use the NEON code - this was a bug caused by having the
|
||||||
|
* wrong order of the 'ON' and 'default' cases. UNSET now defaults to OFF,
|
||||||
|
* as documented in png.h
|
||||||
|
*/
|
||||||
#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)
|
||||||
{
|
{
|
||||||
@@ -177,13 +188,14 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */
|
||||||
|
|
||||||
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
||||||
|
default: /* OFF or INVALID */
|
||||||
|
return;
|
||||||
|
|
||||||
case PNG_OPTION_ON:
|
case PNG_OPTION_ON:
|
||||||
/* Option turned on */
|
/* Option turned on */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* OFF or INVALID */
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -216,4 +228,5 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
|||||||
png_read_filter_row_paeth4_neon;
|
png_read_filter_row_paeth4_neon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_ARM_NEON_SUPPORTED */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
|
#endif /* PNG_READ_SUPPORTED */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
* Last changed in libpng 1.5.16 [May 23, 2013]
|
* 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
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* This is required to get the symbol renames, which are #defines, and also
|
/* This is required to get the symbol renames, which are #defines, and also
|
||||||
* includes the definition (or not) of PNG_ARM_NEON_SUPPORTED.
|
* includes the definition (or not) of PNG_ARM_NEON_OPT.
|
||||||
*/
|
*/
|
||||||
#define PNG_VERSION_INFO_ONLY
|
#define PNG_VERSION_INFO_ONLY
|
||||||
#include "../pngpriv.h"
|
#include "../pngpriv.h"
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_ARM_NEON_SUPPORTED
|
#if PNG_ARM_NEON_OPT > 0
|
||||||
|
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
# define ELF
|
# define ELF
|
||||||
@@ -232,4 +232,4 @@ func png_read_filter_row_paeth3_neon, export=1
|
|||||||
|
|
||||||
pop {r4,pc}
|
pop {r4,pc}
|
||||||
endfunc
|
endfunc
|
||||||
#endif /* PNG_ARM_NEON_SUPPORTED */
|
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||||
|
|||||||
347
compile
Normal file
347
compile
Normal file
@@ -0,0 +1,347 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2012-10-14.11; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
|
||||||
|
# We need space, tab and new line, in precisely that order. Quoting is
|
||||||
|
# there to prevent tools from complaining about whitespace usage.
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
file_conv=
|
||||||
|
|
||||||
|
# func_file_conv build_file lazy
|
||||||
|
# Convert a $build file to $host form and store it in $file
|
||||||
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
|
# type is listed in (the comma separated) LAZY, no conversion will
|
||||||
|
# take place.
|
||||||
|
func_file_conv ()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
case $file in
|
||||||
|
/ | /[!/]*) # absolute file, and not a UNC file
|
||||||
|
if test -z "$file_conv"; then
|
||||||
|
# lazily determine how to convert abs files
|
||||||
|
case `uname -s` in
|
||||||
|
MINGW*)
|
||||||
|
file_conv=mingw
|
||||||
|
;;
|
||||||
|
CYGWIN*)
|
||||||
|
file_conv=cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
file_conv=wine
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
case $file_conv/,$2, in
|
||||||
|
*,$file_conv,*)
|
||||||
|
;;
|
||||||
|
mingw/*)
|
||||||
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
|
;;
|
||||||
|
cygwin/*)
|
||||||
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
wine/*)
|
||||||
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashL linkdir
|
||||||
|
# Make cl look for libraries in LINKDIR
|
||||||
|
func_cl_dashL ()
|
||||||
|
{
|
||||||
|
func_file_conv "$1"
|
||||||
|
if test -z "$lib_path"; then
|
||||||
|
lib_path=$file
|
||||||
|
else
|
||||||
|
lib_path="$lib_path;$file"
|
||||||
|
fi
|
||||||
|
linker_opts="$linker_opts -LIBPATH:$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashl library
|
||||||
|
# Do a library search-path lookup for cl
|
||||||
|
func_cl_dashl ()
|
||||||
|
{
|
||||||
|
lib=$1
|
||||||
|
found=no
|
||||||
|
save_IFS=$IFS
|
||||||
|
IFS=';'
|
||||||
|
for dir in $lib_path $LIB
|
||||||
|
do
|
||||||
|
IFS=$save_IFS
|
||||||
|
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.dll.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/$lib.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/lib$lib.a"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/lib$lib.a
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$save_IFS
|
||||||
|
|
||||||
|
if test "$found" != yes; then
|
||||||
|
lib=$lib.lib
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_wrapper cl arg...
|
||||||
|
# Adjust compile command to suit cl
|
||||||
|
func_cl_wrapper ()
|
||||||
|
{
|
||||||
|
# Assume a capable shell
|
||||||
|
lib_path=
|
||||||
|
shared=:
|
||||||
|
linker_opts=
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.[oO][bB][jJ])
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fo"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fe"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-I)
|
||||||
|
eat=1
|
||||||
|
func_file_conv "$2" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-I*)
|
||||||
|
func_file_conv "${1#-I}" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashl "$2"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l*)
|
||||||
|
func_cl_dashl "${1#-l}"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-L)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashL "$2"
|
||||||
|
;;
|
||||||
|
-L*)
|
||||||
|
func_cl_dashL "${1#-L}"
|
||||||
|
;;
|
||||||
|
-static)
|
||||||
|
shared=false
|
||||||
|
;;
|
||||||
|
-Wl,*)
|
||||||
|
arg=${1#-Wl,}
|
||||||
|
save_ifs="$IFS"; IFS=','
|
||||||
|
for flag in $arg; do
|
||||||
|
IFS="$save_ifs"
|
||||||
|
linker_opts="$linker_opts $flag"
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
;;
|
||||||
|
-Xlinker)
|
||||||
|
eat=1
|
||||||
|
linker_opts="$linker_opts $2"
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||||
|
func_file_conv "$1"
|
||||||
|
set x "$@" -Tp"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||||
|
func_file_conv "$1" mingw
|
||||||
|
set x "$@" "$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if test -n "$linker_opts"; then
|
||||||
|
linker_opts="-link$linker_opts"
|
||||||
|
fi
|
||||||
|
exec "$@" $linker_opts
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
eat=
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||||
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
# So we strip '-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no '-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# '.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
||||||
177
config.guess
vendored
177
config.guess
vendored
@@ -1,14 +1,12 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright 1992-2013 Free Software Foundation, Inc.
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
|
||||||
# 2011, 2012 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
timestamp='2012-09-25'
|
timestamp='2013-11-29'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful, but
|
# This program is distributed in the hope that it will be useful, but
|
||||||
@@ -22,19 +20,17 @@ timestamp='2012-09-25'
|
|||||||
# 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
|
||||||
# configuration script generated by Autoconf, you may include it under
|
# configuration script generated by Autoconf, you may include it under
|
||||||
# the same distribution terms that you use for the rest of that program.
|
# the same distribution terms that you use for the rest of that
|
||||||
|
# program. This Exception is an additional permission under section 7
|
||||||
|
# of the GNU General Public License, version 3 ("GPLv3").
|
||||||
# Originally written by Per Bothner. Please send patches (context
|
|
||||||
# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
|
||||||
# entry.
|
|
||||||
#
|
#
|
||||||
# This script attempts to guess a canonical system name similar to
|
# Originally written by Per Bothner.
|
||||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
|
||||||
# exits with 0. Otherwise, it exits with 1.
|
|
||||||
#
|
#
|
||||||
# You can get the latest version of this script from:
|
# You can get the latest version of this script from:
|
||||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||||
|
#
|
||||||
|
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||||
|
|
||||||
|
|
||||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||||
|
|
||||||
@@ -54,9 +50,7 @@ version="\
|
|||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
Copyright 1992-2013 Free Software Foundation, Inc.
|
||||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|||||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||||
|
|
||||||
|
case "${UNAME_SYSTEM}" in
|
||||||
|
Linux|GNU|GNU/*)
|
||||||
|
# If the system lacks a compiler, then just pick glibc.
|
||||||
|
# We could probably try harder.
|
||||||
|
LIBC=gnu
|
||||||
|
|
||||||
|
eval $set_cc_for_build
|
||||||
|
cat <<-EOF > $dummy.c
|
||||||
|
#include <features.h>
|
||||||
|
#if defined(__UCLIBC__)
|
||||||
|
LIBC=uclibc
|
||||||
|
#elif defined(__dietlibc__)
|
||||||
|
LIBC=dietlibc
|
||||||
|
#else
|
||||||
|
LIBC=gnu
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Note: order is significant - the case branches are not exclusive.
|
# Note: order is significant - the case branches are not exclusive.
|
||||||
|
|
||||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
@@ -859,21 +874,21 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
*:GNU:*:*)
|
*:GNU:*:*)
|
||||||
# the GNU system
|
# the GNU system
|
||||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||||
exit ;;
|
exit ;;
|
||||||
*:GNU/*:*:*)
|
*:GNU/*:*:*)
|
||||||
# other systems with GNU libc and userland
|
# other systems with GNU libc and userland
|
||||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:Minix:*:*)
|
i*86:Minix:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-minix
|
echo ${UNAME_MACHINE}-pc-minix
|
||||||
exit ;;
|
exit ;;
|
||||||
aarch64:Linux:*:*)
|
aarch64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
aarch64_be:Linux:*:*)
|
aarch64_be:Linux:*:*)
|
||||||
UNAME_MACHINE=aarch64_be
|
UNAME_MACHINE=aarch64_be
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
alpha:Linux:*:*)
|
alpha:Linux:*:*)
|
||||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||||
@@ -886,59 +901,54 @@ EOF
|
|||||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||||
esac
|
esac
|
||||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
|
exit ;;
|
||||||
|
arc:Linux:*:* | arceb:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
arm*:Linux:*:*)
|
arm*:Linux:*:*)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep -q __ARM_EABI__
|
| grep -q __ARM_EABI__
|
||||||
then
|
then
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
else
|
else
|
||||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep -q __ARM_PCS_VFP
|
| grep -q __ARM_PCS_VFP
|
||||||
then
|
then
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
|
||||||
else
|
else
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
avr32*:Linux:*:*)
|
avr32*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
cris:Linux:*:*)
|
cris:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
crisv32:Linux:*:*)
|
crisv32:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
frv:Linux:*:*)
|
frv:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
hexagon:Linux:*:*)
|
hexagon:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:Linux:*:*)
|
i*86:Linux:*:*)
|
||||||
LIBC=gnu
|
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||||
eval $set_cc_for_build
|
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
|
||||||
#ifdef __dietlibc__
|
|
||||||
LIBC=dietlibc
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
|
||||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
|
||||||
exit ;;
|
exit ;;
|
||||||
ia64:Linux:*:*)
|
ia64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
m32r*:Linux:*:*)
|
m32r*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
m68*:Linux:*:*)
|
m68*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
mips:Linux:*:* | mips64:Linux:*:*)
|
mips:Linux:*:* | mips64:Linux:*:*)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
@@ -957,54 +967,63 @@ EOF
|
|||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
||||||
;;
|
;;
|
||||||
|
or1k:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
|
exit ;;
|
||||||
or32:Linux:*:*)
|
or32:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
padre:Linux:*:*)
|
padre:Linux:*:*)
|
||||||
echo sparc-unknown-linux-gnu
|
echo sparc-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||||
echo hppa64-unknown-linux-gnu
|
echo hppa64-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||||
# Look for CPU level
|
# Look for CPU level
|
||||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
||||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
||||||
*) echo hppa-unknown-linux-gnu ;;
|
*) echo hppa-unknown-linux-${LIBC} ;;
|
||||||
esac
|
esac
|
||||||
exit ;;
|
exit ;;
|
||||||
ppc64:Linux:*:*)
|
ppc64:Linux:*:*)
|
||||||
echo powerpc64-unknown-linux-gnu
|
echo powerpc64-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
ppc:Linux:*:*)
|
ppc:Linux:*:*)
|
||||||
echo powerpc-unknown-linux-gnu
|
echo powerpc-unknown-linux-${LIBC}
|
||||||
|
exit ;;
|
||||||
|
ppc64le:Linux:*:*)
|
||||||
|
echo powerpc64le-unknown-linux-${LIBC}
|
||||||
|
exit ;;
|
||||||
|
ppcle:Linux:*:*)
|
||||||
|
echo powerpcle-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
s390:Linux:*:* | s390x:Linux:*:*)
|
s390:Linux:*:* | s390x:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-ibm-linux
|
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
sh64*:Linux:*:*)
|
sh64*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
sh*:Linux:*:*)
|
sh*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
tile*:Linux:*:*)
|
tile*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
vax:Linux:*:*)
|
vax:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
x86_64:Linux:*:*)
|
x86_64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
xtensa*:Linux:*:*)
|
xtensa*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:DYNIX/ptx:4*:*)
|
i*86:DYNIX/ptx:4*:*)
|
||||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||||
@@ -1237,19 +1256,31 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
*:Darwin:*:*)
|
*:Darwin:*:*)
|
||||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||||
case $UNAME_PROCESSOR in
|
eval $set_cc_for_build
|
||||||
i386)
|
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||||
eval $set_cc_for_build
|
UNAME_PROCESSOR=powerpc
|
||||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
fi
|
||||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
||||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||||
grep IS_64BIT_ARCH >/dev/null
|
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||||
then
|
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||||
UNAME_PROCESSOR="x86_64"
|
grep IS_64BIT_ARCH >/dev/null
|
||||||
fi
|
then
|
||||||
fi ;;
|
case $UNAME_PROCESSOR in
|
||||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||||
esac
|
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||||
|
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
||||||
|
# that puts up a graphical alert prompting to install
|
||||||
|
# developer tools. Any system running Mac OS X 10.7 or
|
||||||
|
# later (Darwin 11 and later) is required to have a 64-bit
|
||||||
|
# processor. This is not true of the ARM version of Darwin
|
||||||
|
# that Apple uses in portable devices.
|
||||||
|
UNAME_PROCESSOR=x86_64
|
||||||
|
fi
|
||||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||||
|
|||||||
@@ -80,10 +80,7 @@
|
|||||||
#undef PNG_ARM_NEON_CHECK_SUPPORTED
|
#undef PNG_ARM_NEON_CHECK_SUPPORTED
|
||||||
|
|
||||||
/* Enable ARM Neon optimizations */
|
/* Enable ARM Neon optimizations */
|
||||||
#undef PNG_ARM_NEON_SUPPORTED
|
#undef PNG_ARM_NEON_OPT
|
||||||
|
|
||||||
/* Disable ARM Neon optimizations */
|
|
||||||
#undef PNG_NO_ARM_NEON
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|||||||
70
config.sub
vendored
70
config.sub
vendored
@@ -1,24 +1,18 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright 1992-2013 Free Software Foundation, Inc.
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
|
||||||
# 2011, 2012 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
timestamp='2012-12-06'
|
timestamp='2013-10-01'
|
||||||
|
|
||||||
# This file is (in principle) common to ALL GNU software.
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# The presence of a machine in this file suggests that SOME GNU software
|
# under the terms of the GNU General Public License as published by
|
||||||
# can handle that machine. It does not imply ALL GNU software can.
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
#
|
|
||||||
# This file is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful, but
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# GNU General Public License for more details.
|
# 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 <http://www.gnu.org/licenses/>.
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
@@ -26,11 +20,12 @@ timestamp='2012-12-06'
|
|||||||
# 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
|
||||||
# configuration script generated by Autoconf, you may include it under
|
# configuration script generated by Autoconf, you may include it under
|
||||||
# the same distribution terms that you use for the rest of that program.
|
# the same distribution terms that you use for the rest of that
|
||||||
|
# program. This Exception is an additional permission under section 7
|
||||||
|
# of the GNU General Public License, version 3 ("GPLv3").
|
||||||
|
|
||||||
|
|
||||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
||||||
# diff and a properly formatted GNU ChangeLog entry.
|
|
||||||
#
|
#
|
||||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||||
# Supply the specified configuration type as an argument.
|
# Supply the specified configuration type as an argument.
|
||||||
@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
Copyright 1992-2013 Free Software Foundation, Inc.
|
||||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@@ -259,12 +252,12 @@ case $basic_machine in
|
|||||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||||
| am33_2.0 \
|
| am33_2.0 \
|
||||||
| arc \
|
| arc | arceb \
|
||||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||||
| avr | avr32 \
|
| avr | avr32 \
|
||||||
| be32 | be64 \
|
| be32 | be64 \
|
||||||
| bfin \
|
| bfin \
|
||||||
| c4x | clipper \
|
| c4x | c8051 | clipper \
|
||||||
| d10v | d30v | dlx | dsp16xx \
|
| d10v | d30v | dlx | dsp16xx \
|
||||||
| epiphany \
|
| epiphany \
|
||||||
| fido | fr30 | frv \
|
| fido | fr30 | frv \
|
||||||
@@ -272,6 +265,7 @@ case $basic_machine in
|
|||||||
| hexagon \
|
| hexagon \
|
||||||
| i370 | i860 | i960 | ia64 \
|
| i370 | i860 | i960 | ia64 \
|
||||||
| ip2k | iq2000 \
|
| ip2k | iq2000 \
|
||||||
|
| k1om \
|
||||||
| le32 | le64 \
|
| le32 | le64 \
|
||||||
| lm32 \
|
| lm32 \
|
||||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||||
@@ -293,16 +287,17 @@ case $basic_machine in
|
|||||||
| mipsisa64r2 | mipsisa64r2el \
|
| mipsisa64r2 | mipsisa64r2el \
|
||||||
| mipsisa64sb1 | mipsisa64sb1el \
|
| mipsisa64sb1 | mipsisa64sb1el \
|
||||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||||
|
| mipsr5900 | mipsr5900el \
|
||||||
| mipstx39 | mipstx39el \
|
| mipstx39 | mipstx39el \
|
||||||
| mn10200 | mn10300 \
|
| mn10200 | mn10300 \
|
||||||
| moxie \
|
| moxie \
|
||||||
| mt \
|
| mt \
|
||||||
| msp430 \
|
| msp430 \
|
||||||
| nds32 | nds32le | nds32be \
|
| nds32 | nds32le | nds32be \
|
||||||
| nios | nios2 \
|
| nios | nios2 | nios2eb | nios2el \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| open8 \
|
| open8 \
|
||||||
| or32 \
|
| or1k | or32 \
|
||||||
| pdp10 | pdp11 | pj | pjl \
|
| pdp10 | pdp11 | pj | pjl \
|
||||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||||
| pyramid \
|
| pyramid \
|
||||||
@@ -330,7 +325,7 @@ case $basic_machine in
|
|||||||
c6x)
|
c6x)
|
||||||
basic_machine=tic6x-unknown
|
basic_machine=tic6x-unknown
|
||||||
;;
|
;;
|
||||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=-none
|
os=-none
|
||||||
;;
|
;;
|
||||||
@@ -372,13 +367,13 @@ case $basic_machine in
|
|||||||
| aarch64-* | aarch64_be-* \
|
| aarch64-* | aarch64_be-* \
|
||||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||||
| avr-* | avr32-* \
|
| avr-* | avr32-* \
|
||||||
| be32-* | be64-* \
|
| be32-* | be64-* \
|
||||||
| bfin-* | bs2000-* \
|
| bfin-* | bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||||
| clipper-* | craynv-* | cydra-* \
|
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||||
| d10v-* | d30v-* | dlx-* \
|
| d10v-* | d30v-* | dlx-* \
|
||||||
| elxsi-* \
|
| elxsi-* \
|
||||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||||
@@ -387,6 +382,7 @@ case $basic_machine in
|
|||||||
| hexagon-* \
|
| hexagon-* \
|
||||||
| i*86-* | i860-* | i960-* | ia64-* \
|
| i*86-* | i860-* | i960-* | ia64-* \
|
||||||
| ip2k-* | iq2000-* \
|
| ip2k-* | iq2000-* \
|
||||||
|
| k1om-* \
|
||||||
| le32-* | le64-* \
|
| le32-* | le64-* \
|
||||||
| lm32-* \
|
| lm32-* \
|
||||||
| m32c-* | m32r-* | m32rle-* \
|
| m32c-* | m32r-* | m32rle-* \
|
||||||
@@ -410,12 +406,13 @@ case $basic_machine in
|
|||||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||||
|
| mipsr5900-* | mipsr5900el-* \
|
||||||
| mipstx39-* | mipstx39el-* \
|
| mipstx39-* | mipstx39el-* \
|
||||||
| mmix-* \
|
| mmix-* \
|
||||||
| mt-* \
|
| mt-* \
|
||||||
| msp430-* \
|
| msp430-* \
|
||||||
| nds32-* | nds32le-* | nds32be-* \
|
| nds32-* | nds32le-* | nds32be-* \
|
||||||
| nios-* | nios2-* \
|
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||||
| open8-* \
|
| open8-* \
|
||||||
| orion-* \
|
| orion-* \
|
||||||
@@ -799,7 +796,7 @@ case $basic_machine in
|
|||||||
os=-mingw64
|
os=-mingw64
|
||||||
;;
|
;;
|
||||||
mingw32)
|
mingw32)
|
||||||
basic_machine=i386-pc
|
basic_machine=i686-pc
|
||||||
os=-mingw32
|
os=-mingw32
|
||||||
;;
|
;;
|
||||||
mingw32ce)
|
mingw32ce)
|
||||||
@@ -835,7 +832,7 @@ case $basic_machine in
|
|||||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||||
;;
|
;;
|
||||||
msys)
|
msys)
|
||||||
basic_machine=i386-pc
|
basic_machine=i686-pc
|
||||||
os=-msys
|
os=-msys
|
||||||
;;
|
;;
|
||||||
mvs)
|
mvs)
|
||||||
@@ -1357,7 +1354,7 @@ case $os in
|
|||||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||||
| -sym* | -kopensolaris* \
|
| -sym* | -kopensolaris* | -plan9* \
|
||||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||||
| -aos* | -aros* \
|
| -aos* | -aros* \
|
||||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||||
@@ -1503,9 +1500,6 @@ case $os in
|
|||||||
-aros*)
|
-aros*)
|
||||||
os=-aros
|
os=-aros
|
||||||
;;
|
;;
|
||||||
-kaos*)
|
|
||||||
os=-kaos
|
|
||||||
;;
|
|
||||||
-zvmoe)
|
-zvmoe)
|
||||||
os=-zvmoe
|
os=-zvmoe
|
||||||
;;
|
;;
|
||||||
@@ -1554,6 +1548,9 @@ case $basic_machine in
|
|||||||
c4x-* | tic4x-*)
|
c4x-* | tic4x-*)
|
||||||
os=-coff
|
os=-coff
|
||||||
;;
|
;;
|
||||||
|
c8051-*)
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
hexagon-*)
|
hexagon-*)
|
||||||
os=-elf
|
os=-elf
|
||||||
;;
|
;;
|
||||||
@@ -1597,6 +1594,9 @@ case $basic_machine in
|
|||||||
mips*-*)
|
mips*-*)
|
||||||
os=-elf
|
os=-elf
|
||||||
;;
|
;;
|
||||||
|
or1k-*)
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
or32-*)
|
or32-*)
|
||||||
os=-coff
|
os=-coff
|
||||||
;;
|
;;
|
||||||
|
|||||||
247
configure
vendored
247
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for libpng 1.5.16.
|
# Generated by GNU Autoconf 2.69 for libpng 1.5.21.
|
||||||
#
|
#
|
||||||
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
|
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
|
||||||
#
|
#
|
||||||
@@ -590,8 +590,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='libpng'
|
PACKAGE_NAME='libpng'
|
||||||
PACKAGE_TARNAME='libpng'
|
PACKAGE_TARNAME='libpng'
|
||||||
PACKAGE_VERSION='1.5.16'
|
PACKAGE_VERSION='1.5.21'
|
||||||
PACKAGE_STRING='libpng 1.5.16'
|
PACKAGE_STRING='libpng 1.5.21'
|
||||||
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
|
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
@@ -637,6 +637,12 @@ am__EXEEXT_TRUE
|
|||||||
LTLIBOBJS
|
LTLIBOBJS
|
||||||
PNG_ARM_NEON_FALSE
|
PNG_ARM_NEON_FALSE
|
||||||
PNG_ARM_NEON_TRUE
|
PNG_ARM_NEON_TRUE
|
||||||
|
DO_INSTALL_LIBPNG_CONFIG_FALSE
|
||||||
|
DO_INSTALL_LIBPNG_CONFIG_TRUE
|
||||||
|
DO_INSTALL_LIBPNG_PC_FALSE
|
||||||
|
DO_INSTALL_LIBPNG_PC_TRUE
|
||||||
|
DO_INSTALL_LINKS_FALSE
|
||||||
|
DO_INSTALL_LINKS_TRUE
|
||||||
binconfigs
|
binconfigs
|
||||||
pkgconfigdir
|
pkgconfigdir
|
||||||
PNGLIB_RELEASE
|
PNGLIB_RELEASE
|
||||||
@@ -789,6 +795,9 @@ enable_libtool_lock
|
|||||||
with_zlib_prefix
|
with_zlib_prefix
|
||||||
with_pkgconfigdir
|
with_pkgconfigdir
|
||||||
with_binconfigs
|
with_binconfigs
|
||||||
|
enable_unversioned_links
|
||||||
|
enable_unversioned_libpng_pc
|
||||||
|
enable_unversioned_libpng_config
|
||||||
enable_arm_neon
|
enable_arm_neon
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
@@ -1342,7 +1351,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures libpng 1.5.16 to adapt to many kinds of systems.
|
\`configure' configures libpng 1.5.21 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1412,7 +1421,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of libpng 1.5.16:";;
|
short | recursive ) echo "Configuration of libpng 1.5.21:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1434,12 +1443,41 @@ Optional Features:
|
|||||||
--enable-fast-install[=PKGS]
|
--enable-fast-install[=PKGS]
|
||||||
optimize for fast installation [default=yes]
|
optimize for fast installation [default=yes]
|
||||||
--disable-libtool-lock avoid locking (might break parallel builds)
|
--disable-libtool-lock avoid locking (might break parallel builds)
|
||||||
|
--enable-unversioned-links
|
||||||
|
Installed libpng header files are placed in a
|
||||||
|
versioned subdirectory and installed libpng library
|
||||||
|
(including DLL) files are versioned. If this option
|
||||||
|
is enabled unversioned links will be created
|
||||||
|
pointing to the corresponding installed files. If
|
||||||
|
you use libpng.pc or libpng-config for all builds
|
||||||
|
you do not need these links, but if you compile
|
||||||
|
programs directly they will typically #include
|
||||||
|
<png.h> and link with -lpng; in that case you need
|
||||||
|
the links. The links can be installed manually using
|
||||||
|
'make install-header-links' and 'make
|
||||||
|
install-library-links' and can be removed using the
|
||||||
|
corresponding uninstall- targets. If you do enable
|
||||||
|
this option every libpng 'make install' will
|
||||||
|
recreate the links to point to the just installed
|
||||||
|
version of libpng. The default is to create the
|
||||||
|
links; use --disable-unversioned-links to change
|
||||||
|
this
|
||||||
|
--enable-unversioned-libpng-pc
|
||||||
|
Install the configuration file 'libpng.pc' as a link
|
||||||
|
to the versioned version. This is done by default -
|
||||||
|
use --disable-unversioned-libpng-pc to change this.
|
||||||
|
--enable-unversioned-libpng-config
|
||||||
|
Install the configuration file 'libpng-config' as a
|
||||||
|
link to the versioned version. This is done by
|
||||||
|
default - use --disable-unversioned-libpng-config to
|
||||||
|
change this.
|
||||||
--enable-arm-neon Enable ARM NEON optimizations: =no/off, check, api,
|
--enable-arm-neon Enable ARM NEON optimizations: =no/off, check, api,
|
||||||
yes/on: no/off: disable the optimizations; check:
|
yes/on: no/off: disable the optimizations; check:
|
||||||
use internal checking code (deprecated and poorly
|
use internal checking code (deprecated and poorly
|
||||||
supported); api: disable by default, enable by a
|
supported); api: disable by default, enable by a
|
||||||
call to png_set_option; yes/on: turn on
|
call to png_set_option; yes/on: turn on
|
||||||
unconditionally.
|
unconditionally. If not specified: determined by the
|
||||||
|
compiler.
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
@@ -1533,7 +1571,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
libpng configure 1.5.16
|
libpng configure 1.5.21
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
@@ -1956,7 +1994,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by libpng $as_me 1.5.16, which was
|
It was created by libpng $as_me 1.5.21, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -2304,7 +2342,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
|||||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
|
||||||
am__api_version='1.13'
|
am__api_version='1.14'
|
||||||
|
|
||||||
ac_aux_dir=
|
ac_aux_dir=
|
||||||
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
|
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
|
||||||
@@ -2819,7 +2857,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='libpng'
|
PACKAGE='libpng'
|
||||||
VERSION='1.5.16'
|
VERSION='1.5.21'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@@ -2859,6 +2897,10 @@ mkdir_p='$(MKDIR_P)'
|
|||||||
# in the wild :-( We should find a proper way to deprecate it ...
|
# in the wild :-( We should find a proper way to deprecate it ...
|
||||||
AMTAR='$${TAR-tar}'
|
AMTAR='$${TAR-tar}'
|
||||||
|
|
||||||
|
|
||||||
|
# We'll loop over all known methods to create a tar archive until one works.
|
||||||
|
_am_tools='gnutar pax cpio none'
|
||||||
|
|
||||||
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
|
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
|
||||||
|
|
||||||
|
|
||||||
@@ -2866,6 +2908,48 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# POSIX will say in a future version that running "rm -f" with no argument
|
||||||
|
# is OK; and we want to be able to make that assumption in our Makefile
|
||||||
|
# recipes. So use an aggressive probe to check that the usage we want is
|
||||||
|
# actually supported "in the wild" to an acceptable degree.
|
||||||
|
# See automake bug#10828.
|
||||||
|
# To make any issue more visible, cause the running configure to be aborted
|
||||||
|
# by default if the 'rm' program in use doesn't match our expectations; the
|
||||||
|
# user can still override this though.
|
||||||
|
if rm -f && rm -fr && rm -rf; then : OK; else
|
||||||
|
cat >&2 <<'END'
|
||||||
|
Oops!
|
||||||
|
|
||||||
|
Your 'rm' program seems unable to run without file operands specified
|
||||||
|
on the command line, even when the '-f' option is present. This is contrary
|
||||||
|
to the behaviour of most rm programs out there, and not conforming with
|
||||||
|
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
||||||
|
|
||||||
|
Please tell bug-automake@gnu.org about your system, including the value
|
||||||
|
of your $PATH and any error possibly output before this message. This
|
||||||
|
can help us improve future automake versions.
|
||||||
|
|
||||||
|
END
|
||||||
|
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
|
||||||
|
echo 'Configuration will proceed anyway, since you have set the' >&2
|
||||||
|
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
|
||||||
|
echo >&2
|
||||||
|
else
|
||||||
|
cat >&2 <<'END'
|
||||||
|
Aborting the configuration process, to ensure you take notice of the issue.
|
||||||
|
|
||||||
|
You can download and install GNU coreutils to get an 'rm' implementation
|
||||||
|
that behaves properly: <http://www.gnu.org/software/coreutils/>.
|
||||||
|
|
||||||
|
If you want to complete the configuration process using your problematic
|
||||||
|
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
|
||||||
|
to "yes", and re-run configure.
|
||||||
|
|
||||||
|
END
|
||||||
|
as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
||||||
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
|
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
|
||||||
# Check whether --enable-maintainer-mode was given.
|
# Check whether --enable-maintainer-mode was given.
|
||||||
@@ -2889,10 +2973,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
PNGLIB_VERSION=1.5.16
|
PNGLIB_VERSION=1.5.21
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=5
|
PNGLIB_MINOR=5
|
||||||
PNGLIB_RELEASE=16
|
PNGLIB_RELEASE=21
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3694,6 +3778,65 @@ ac_cpp='$CPP $CPPFLAGS'
|
|||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
|
ac_ext=c
|
||||||
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
|
||||||
|
$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
|
||||||
|
if ${am_cv_prog_cc_c_o+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
# Make sure it works both with $CC and with simple cc.
|
||||||
|
# Following AC_PROG_CC_C_O, we do the test twice because some
|
||||||
|
# compilers refuse to overwrite an existing .o file with -o,
|
||||||
|
# though they will create one.
|
||||||
|
am_cv_prog_cc_c_o=yes
|
||||||
|
for am_i in 1 2; do
|
||||||
|
if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
|
||||||
|
($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } \
|
||||||
|
&& test -f conftest2.$ac_objext; then
|
||||||
|
: OK
|
||||||
|
else
|
||||||
|
am_cv_prog_cc_c_o=no
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm -f core conftest*
|
||||||
|
unset am_i
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
|
||||||
|
$as_echo "$am_cv_prog_cc_c_o" >&6; }
|
||||||
|
if test "$am_cv_prog_cc_c_o" != yes; then
|
||||||
|
# Losing compiler, so override with the script.
|
||||||
|
# FIXME: It is wrong to rewrite CC.
|
||||||
|
# But if we don't then we get into trouble of one sort or another.
|
||||||
|
# A longer-term fix would be to have automake use am__CC in this case,
|
||||||
|
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||||
|
CC="$am_aux_dir/compile $CC"
|
||||||
|
fi
|
||||||
|
ac_ext=c
|
||||||
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||||
|
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
DEPDIR="${am__leading_dot}deps"
|
DEPDIR="${am__leading_dot}deps"
|
||||||
|
|
||||||
ac_config_commands="$ac_config_commands depfiles"
|
ac_config_commands="$ac_config_commands depfiles"
|
||||||
@@ -12761,7 +12904,7 @@ if test "$have_ld_version_script" = "yes"; then
|
|||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
|
||||||
$as_echo_n "checking for symbol prefix... " >&6; }
|
$as_echo_n "checking for symbol prefix... " >&6; }
|
||||||
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__::"`
|
||||||
|
|
||||||
@@ -12807,6 +12950,54 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Control over what links are made for installed files. Versioned files are
|
||||||
|
# always installed, when the following options are turned on corresponding
|
||||||
|
# unversioned links are also created (normally as symbolic links):
|
||||||
|
# Check whether --enable-unversioned-links was given.
|
||||||
|
if test "${enable_unversioned_links+set}" = set; then :
|
||||||
|
enableval=$enable_unversioned_links;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# The AM_CONDITIONAL test is written so that the default is enabled;
|
||||||
|
# --disable-unversioned-links must be given to turn the option off.
|
||||||
|
if test "$enable_unversioned_links" != "no"; then
|
||||||
|
DO_INSTALL_LINKS_TRUE=
|
||||||
|
DO_INSTALL_LINKS_FALSE='#'
|
||||||
|
else
|
||||||
|
DO_INSTALL_LINKS_TRUE='#'
|
||||||
|
DO_INSTALL_LINKS_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-unversioned-libpng-pc was given.
|
||||||
|
if test "${enable_unversioned_libpng_pc+set}" = set; then :
|
||||||
|
enableval=$enable_unversioned_libpng_pc;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$enable_unversioned_libpng_pc" != "no"; then
|
||||||
|
DO_INSTALL_LIBPNG_PC_TRUE=
|
||||||
|
DO_INSTALL_LIBPNG_PC_FALSE='#'
|
||||||
|
else
|
||||||
|
DO_INSTALL_LIBPNG_PC_TRUE='#'
|
||||||
|
DO_INSTALL_LIBPNG_PC_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-unversioned-libpng-config was given.
|
||||||
|
if test "${enable_unversioned_libpng_config+set}" = set; then :
|
||||||
|
enableval=$enable_unversioned_libpng_config;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$enable_unversioned_libpng_config" != "no"; then
|
||||||
|
DO_INSTALL_LIBPNG_CONFIG_TRUE=
|
||||||
|
DO_INSTALL_LIBPNG_CONFIG_FALSE='#'
|
||||||
|
else
|
||||||
|
DO_INSTALL_LIBPNG_CONFIG_TRUE='#'
|
||||||
|
DO_INSTALL_LIBPNG_CONFIG_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# HOST SPECIFIC OPTIONS
|
# HOST SPECIFIC OPTIONS
|
||||||
# =====================
|
# =====================
|
||||||
#
|
#
|
||||||
@@ -12821,7 +13012,7 @@ if test "${enable_arm_neon+set}" = set; then :
|
|||||||
no|off)
|
no|off)
|
||||||
# disable the default enabling on __ARM_NEON__ systems:
|
# disable the default enabling on __ARM_NEON__ systems:
|
||||||
|
|
||||||
$as_echo "#define PNG_NO_ARM_NEON /**/" >>confdefs.h
|
$as_echo "#define PNG_ARM_NEON_OPT 0" >>confdefs.h
|
||||||
|
|
||||||
# Prevent inclusion of the assembler files below:
|
# Prevent inclusion of the assembler files below:
|
||||||
enable_arm_neon=no;;
|
enable_arm_neon=no;;
|
||||||
@@ -12835,8 +13026,14 @@ $as_echo "#define PNG_ARM_NEON_API_SUPPORTED /**/" >>confdefs.h
|
|||||||
;;
|
;;
|
||||||
yes|on)
|
yes|on)
|
||||||
|
|
||||||
$as_echo "#define PNG_ARM_NEON_SUPPORTED /**/" >>confdefs.h
|
$as_echo "#define PNG_ARM_NEON_OPT 2" >>confdefs.h
|
||||||
;;
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-arm-neon: please specify 'check' or 'api', if
|
||||||
|
you want the optimizations unconditionally pass -mfpu=neon
|
||||||
|
to the compiler." >&5
|
||||||
|
$as_echo "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'api', if
|
||||||
|
you want the optimizations unconditionally pass -mfpu=neon
|
||||||
|
to the compiler." >&2;};;
|
||||||
*)
|
*)
|
||||||
as_fn_error $? "--enable-arm-neon=${enable_arm_neon}: invalid value" "$LINENO" 5
|
as_fn_error $? "--enable-arm-neon=${enable_arm_neon}: invalid value" "$LINENO" 5
|
||||||
esac
|
esac
|
||||||
@@ -13018,6 +13215,18 @@ if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT
|
|||||||
as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
|
as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
|
if test -z "${DO_INSTALL_LINKS_TRUE}" && test -z "${DO_INSTALL_LINKS_FALSE}"; then
|
||||||
|
as_fn_error $? "conditional \"DO_INSTALL_LINKS\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
fi
|
||||||
|
if test -z "${DO_INSTALL_LIBPNG_PC_TRUE}" && test -z "${DO_INSTALL_LIBPNG_PC_FALSE}"; then
|
||||||
|
as_fn_error $? "conditional \"DO_INSTALL_LIBPNG_PC\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
fi
|
||||||
|
if test -z "${DO_INSTALL_LIBPNG_CONFIG_TRUE}" && test -z "${DO_INSTALL_LIBPNG_CONFIG_FALSE}"; then
|
||||||
|
as_fn_error $? "conditional \"DO_INSTALL_LIBPNG_CONFIG\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
fi
|
||||||
if test -z "${PNG_ARM_NEON_TRUE}" && test -z "${PNG_ARM_NEON_FALSE}"; then
|
if test -z "${PNG_ARM_NEON_TRUE}" && test -z "${PNG_ARM_NEON_FALSE}"; then
|
||||||
as_fn_error $? "conditional \"PNG_ARM_NEON\" was never defined.
|
as_fn_error $? "conditional \"PNG_ARM_NEON\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
@@ -13419,7 +13628,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by libpng $as_me 1.5.16, which was
|
This file was extended by libpng $as_me 1.5.21, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -13485,7 +13694,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
libpng config.status 1.5.16
|
libpng config.status 1.5.21
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
@@ -14546,7 +14755,7 @@ $as_echo X"$mf" |
|
|||||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||||
test -z "$DEPDIR" && continue
|
test -z "$DEPDIR" && continue
|
||||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||||
test -z "am__include" && continue
|
test -z "$am__include" && continue
|
||||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||||
# Find all dependency output files, they are included files with
|
# Find all dependency output files, they are included files with
|
||||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||||
|
|||||||
61
configure.ac
61
configure.ac
@@ -18,15 +18,15 @@ AC_PREREQ(2.59)
|
|||||||
|
|
||||||
dnl Version number stuff here:
|
dnl Version number stuff here:
|
||||||
|
|
||||||
AC_INIT([libpng], [1.5.16], [png-mng-implement@lists.sourceforge.net])
|
AC_INIT([libpng], [1.5.21], [png-mng-implement@lists.sourceforge.net])
|
||||||
AM_INIT_AUTOMAKE([serial-tests])
|
AM_INIT_AUTOMAKE([1.13 serial-tests subdir-objects])
|
||||||
dnl stop configure from automagically running automake
|
dnl stop configure from automagically running automake
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
PNGLIB_VERSION=1.5.16
|
PNGLIB_VERSION=1.5.21
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=5
|
PNGLIB_MINOR=5
|
||||||
PNGLIB_RELEASE=16
|
PNGLIB_RELEASE=21
|
||||||
|
|
||||||
dnl End of version number stuff
|
dnl End of version number stuff
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ 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)
|
||||||
@@ -166,6 +166,45 @@ AC_ARG_WITH(binconfigs,
|
|||||||
[binconfigs='${binconfigs}'])
|
[binconfigs='${binconfigs}'])
|
||||||
AC_SUBST([binconfigs])
|
AC_SUBST([binconfigs])
|
||||||
|
|
||||||
|
# Control over what links are made for installed files. Versioned files are
|
||||||
|
# always installed, when the following options are turned on corresponding
|
||||||
|
# unversioned links are also created (normally as symbolic links):
|
||||||
|
AC_ARG_ENABLE([unversioned-links],
|
||||||
|
AS_HELP_STRING([[[--enable-unversioned-links]]],
|
||||||
|
[Installed libpng header files are placed in a versioned subdirectory]
|
||||||
|
[and installed libpng library (including DLL) files are versioned.]
|
||||||
|
[If this option is enabled unversioned links will be created pointing to]
|
||||||
|
[the corresponding installed files. If you use libpng.pc or]
|
||||||
|
[libpng-config for all builds you do not need these links, but if you]
|
||||||
|
[compile programs directly they will typically #include <png.h> and]
|
||||||
|
[link with -lpng; in that case you need the links.]
|
||||||
|
[The links can be installed manually using 'make install-header-links']
|
||||||
|
[and 'make install-library-links' and can be removed using the]
|
||||||
|
[corresponding uninstall- targets. If you do enable this option every]
|
||||||
|
[libpng 'make install' will recreate the links to point to the just]
|
||||||
|
[installed version of libpng. The default is to create the links;]
|
||||||
|
[use --disable-unversioned-links to change this]))
|
||||||
|
|
||||||
|
# The AM_CONDITIONAL test is written so that the default is enabled;
|
||||||
|
# --disable-unversioned-links must be given to turn the option off.
|
||||||
|
AM_CONDITIONAL([DO_INSTALL_LINKS],[test "$enable_unversioned_links" != "no"])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([unversioned-libpng-pc],
|
||||||
|
AS_HELP_STRING([[[--enable-unversioned-libpng-pc]]],
|
||||||
|
[Install the configuration file 'libpng.pc' as a link to the versioned]
|
||||||
|
[version. This is done by default - use --disable-unversioned-libpng-pc]
|
||||||
|
[to change this.]))
|
||||||
|
AM_CONDITIONAL([DO_INSTALL_LIBPNG_PC],
|
||||||
|
[test "$enable_unversioned_libpng_pc" != "no"])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([unversioned-libpng-config],
|
||||||
|
AS_HELP_STRING([[[--enable-unversioned-libpng-config]]],
|
||||||
|
[Install the configuration file 'libpng-config' as a link to the]
|
||||||
|
[versioned version. This is done by default - use]
|
||||||
|
[--disable-unversioned-libpng-config to change this.]))
|
||||||
|
AM_CONDITIONAL([DO_INSTALL_LIBPNG_CONFIG],
|
||||||
|
[test "$enable_unversioned_libpng_config" != "no"])
|
||||||
|
|
||||||
# HOST SPECIFIC OPTIONS
|
# HOST SPECIFIC OPTIONS
|
||||||
# =====================
|
# =====================
|
||||||
#
|
#
|
||||||
@@ -179,11 +218,12 @@ AC_ARG_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; check: use internal checking code]
|
[no/off: disable the optimizations; check: use internal checking code]
|
||||||
[(deprecated and poorly supported); api: disable by default, enable by]
|
[(deprecated and poorly supported); api: disable by default, enable by]
|
||||||
[a call to png_set_option; yes/on: turn on unconditionally.]),
|
[a call to png_set_option; yes/on: turn on unconditionally.]
|
||||||
|
[If not specified: determined by the compiler.]),
|
||||||
[case "$enableval" in
|
[case "$enableval" in
|
||||||
no|off)
|
no|off)
|
||||||
# disable the default enabling on __ARM_NEON__ systems:
|
# disable the default enabling on __ARM_NEON__ systems:
|
||||||
AC_DEFINE([PNG_NO_ARM_NEON], [],
|
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;;
|
||||||
@@ -194,8 +234,11 @@ AC_ARG_ENABLE([arm-neon],
|
|||||||
AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [],
|
AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [],
|
||||||
[Turn on ARM Neon optimizations at run-time]);;
|
[Turn on ARM Neon optimizations at run-time]);;
|
||||||
yes|on)
|
yes|on)
|
||||||
AC_DEFINE([PNG_ARM_NEON_SUPPORTED], [],
|
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', if]
|
||||||
|
[you want the optimizations unconditionally pass -mfpu=neon]
|
||||||
|
[to the compiler.]);;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value])
|
AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value])
|
||||||
esac])
|
esac])
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ CC = gcc
|
|||||||
#CC = i386-mingw32msvc-gcc # e.g., Linux -> Win32 cross-compilation
|
#CC = i386-mingw32msvc-gcc # e.g., Linux -> Win32 cross-compilation
|
||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
CFLAGS = -O -Wall $(INCS) $(MINGW_CCFLAGS)
|
CPPFLAGS = $(INCS)
|
||||||
|
CFLAGS = -O -Wall $(MINGW_CCFLAGS)
|
||||||
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
||||||
# [-ansi, -pedantic and -W can also be used]
|
# [-ansi, -pedantic and -W can also be used]
|
||||||
LDFLAGS = $(MINGW_LDFLAGS)
|
LDFLAGS = $(MINGW_LDFLAGS)
|
||||||
@@ -85,10 +86,10 @@ EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
%.pic$(O): %.c
|
%.pic$(O): %.c
|
||||||
$(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -DPNG_BUILD_DLL -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
# dependencies --------------------------------------------------------------
|
# dependencies --------------------------------------------------------------
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ CC = cc
|
|||||||
LD = cc
|
LD = cc
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
# ABI must be the same as that used to build libpng.
|
# ABI must be the same as that used to build libpng.
|
||||||
ABI=
|
ABI =
|
||||||
|
CPPFLAGS =
|
||||||
CFLAGS = $(ABI) -O -fullwarn $(INCS)
|
CFLAGS = $(ABI) -O -fullwarn $(INCS)
|
||||||
LDFLAGS = $(ABI)
|
LDFLAGS = $(ABI)
|
||||||
O = .o
|
O = .o
|
||||||
@@ -73,7 +74,7 @@ EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
# dependencies --------------------------------------------------------------
|
# dependencies --------------------------------------------------------------
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ WLIBSs = $(PNGLIBs) $(ZLIBs)
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
LD = gcc
|
LD = gcc
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
CFLAGS = -O -Wall $(INCS) -DFEATURE_LOOP
|
CPPFLAGS = $(INCS) -DFEATURE_LOOP
|
||||||
|
CFLAGS = -O -Wall
|
||||||
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
# [note that -Wall is a gcc-specific compilation flag ("most warnings on")]
|
||||||
# [-ansi, -pedantic and -W can also be used]
|
# [-ansi, -pedantic and -W can also be used]
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
@@ -92,7 +93,7 @@ EXES = $(STATIC_EXES) $(DYNAMIC_EXES)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
# dependencies --------------------------------------------------------------
|
# dependencies --------------------------------------------------------------
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ WLIBS = $(PNGLIB) $(ZLIB)
|
|||||||
CC = cl
|
CC = cl
|
||||||
LD = link
|
LD = link
|
||||||
RM = del
|
RM = del
|
||||||
CFLAGS = -nologo -O -W3 $(INCS) $(cvars)
|
CPPFLAGS = $(INCS)
|
||||||
|
CFLAGS = -nologo -O -W3 $(cvars)
|
||||||
# [note that -W3 is an MSVC-specific compilation flag ("all warnings on")]
|
# [note that -W3 is an MSVC-specific compilation flag ("all warnings on")]
|
||||||
# [see %devstudio%\vc\include\win32.mak for cvars macro definition]
|
# [see %devstudio%\vc\include\win32.mak for cvars macro definition]
|
||||||
O = .obj
|
O = .obj
|
||||||
@@ -76,7 +77,7 @@ EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E)
|
|||||||
# implicit make rules -------------------------------------------------------
|
# implicit make rules -------------------------------------------------------
|
||||||
|
|
||||||
.c$(O):
|
.c$(O):
|
||||||
$(CC) -c $(CFLAGS) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
# dependencies --------------------------------------------------------------
|
# dependencies --------------------------------------------------------------
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@ RM=rm -f
|
|||||||
COPY=cp
|
COPY=cp
|
||||||
|
|
||||||
CPPFLAGS=-I. -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
CPPFLAGS=-I. -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
||||||
CFLAGS=-O1
|
CFLAGS=-O1 -Wall
|
||||||
|
|
||||||
C=.c
|
C=.c
|
||||||
O=.o
|
O=.o
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ RM=rm -f
|
|||||||
COPY=cp
|
COPY=cp
|
||||||
|
|
||||||
CPPFLAGS=-I. -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
CPPFLAGS=-I. -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
||||||
CFLAGS=-O1
|
CFLAGS=-O1 -Wall
|
||||||
|
|
||||||
C=.c
|
C=.c
|
||||||
O=.o
|
O=.o
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ everything = off
|
|||||||
|
|
||||||
option WRITE on
|
option WRITE on
|
||||||
# These 2 options are required if you need to read PGM (P1 or P4) PGM files.
|
# These 2 options are required if you need to read PGM (P1 or P4) PGM files.
|
||||||
# option WRITE_INVERT on
|
option WRITE_INVERT on
|
||||||
# option WRITE_PACK on
|
option WRITE_PACK on
|
||||||
|
|
||||||
# You must choose fixed or floating point arithmetic:
|
# You must choose fixed or floating point arithmetic:
|
||||||
# option FLOATING_POINT on
|
# option FLOATING_POINT on
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ XLIB = -L/usr/X11R6/lib -lX11
|
|||||||
LIBS = $(XLIB) -lm #platforms that need libm
|
LIBS = $(XLIB) -lm #platforms that need libm
|
||||||
|
|
||||||
CPPFLAGS=-I. $(XINC) -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
CPPFLAGS=-I. $(XINC) -DPNG_USER_CONFIG -DNO_GZCOMPRESS -DZ_SOLO -DNO_GZIP
|
||||||
CFLAGS=-O1
|
CFLAGS=-O1 -Wall
|
||||||
|
|
||||||
C=.c
|
C=.c
|
||||||
O=.o
|
O=.o
|
||||||
|
|||||||
5
depcomp
5
depcomp
@@ -1,9 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
scriptversion=2012-10-18.11; # UTC
|
scriptversion=2013-05-30.07; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -552,6 +552,7 @@ $ {
|
|||||||
G
|
G
|
||||||
p
|
p
|
||||||
}' >> "$depfile"
|
}' >> "$depfile"
|
||||||
|
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
16
example.c
16
example.c
@@ -2,8 +2,8 @@
|
|||||||
#if 0 /* in case someone actually tries to compile this */
|
#if 0 /* in case someone actually tries to compile this */
|
||||||
|
|
||||||
/* example.c - an example of using libpng
|
/* example.c - an example of using libpng
|
||||||
* Last changed in libpng 1.5.10 [March 8, 2012]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Maintained 1998-2012 Glenn Randers-Pehrson
|
* Maintained 1998-2014 Glenn Randers-Pehrson
|
||||||
* Maintained 1996, 1997 Andreas Dilger
|
* Maintained 1996, 1997 Andreas Dilger
|
||||||
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||||
*/
|
*/
|
||||||
@@ -259,9 +259,9 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
|
|||||||
/* If we don't have another value */
|
/* If we don't have another value */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen_gamma = 2.2; /* A good guess for a PC monitor in a dimly
|
screen_gamma = PNG_DEFAULT_sRGB; /* A good guess for a PC monitor
|
||||||
lit room */
|
in a dimly lit room */
|
||||||
screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */
|
screen_gamma = PNG_GAMMA_MAC_18 or 1.0; /* Good guesses for Mac systems */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tell libpng to handle the gamma conversion for you. The final call
|
/* Tell libpng to handle the gamma conversion for you. The final call
|
||||||
@@ -273,7 +273,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
|
|||||||
int intent;
|
int intent;
|
||||||
|
|
||||||
if (png_get_sRGB(png_ptr, info_ptr, &intent))
|
if (png_get_sRGB(png_ptr, info_ptr, &intent))
|
||||||
png_set_gamma(png_ptr, screen_gamma, 0.45455);
|
png_set_gamma(png_ptr, screen_gamma, PNG_DEFAULT_sRGB);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double image_gamma;
|
double image_gamma;
|
||||||
@@ -750,7 +750,7 @@ void write_png(char *file_name /* , ... other image information ... */)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Once we write out the header, the compression type on the text
|
/* Once we write out the header, the compression type on the text
|
||||||
* chunks gets changed to PNG_TEXT_COMPRESSION_NONE_WR or
|
* chunk gets changed to PNG_TEXT_COMPRESSION_NONE_WR or
|
||||||
* PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again
|
* PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again
|
||||||
* at the end.
|
* at the end.
|
||||||
*/
|
*/
|
||||||
@@ -788,7 +788,7 @@ void write_png(char *file_name /* , ... other image information ... */)
|
|||||||
png_set_packswap(png_ptr);
|
png_set_packswap(png_ptr);
|
||||||
|
|
||||||
/* Turn on interlace handling if you are not using png_write_image() */
|
/* Turn on interlace handling if you are not using png_write_image() */
|
||||||
if (interlacing)
|
if (interlacing != 0)
|
||||||
number_passes = png_set_interlace_handling(png_ptr);
|
number_passes = png_set_interlace_handling(png_ptr);
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
Libpng-manual.txt - A description on how to use and modify libpng
|
Libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.5.16 - May 23, 2013
|
libpng version 1.5.21 - December 22, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 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
|
||||||
@@ -11,9 +11,9 @@ Libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.16 - May 23, 2013
|
libpng versions 0.97, January 1998, through 1.5.21 - December 22, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
libpng 1.0 beta 6 version 0.96 May 28, 1997
|
libpng 1.0 beta 6 version 0.96 May 28, 1997
|
||||||
Updated and distributed by Andreas Dilger
|
Updated and distributed by Andreas Dilger
|
||||||
@@ -255,10 +255,10 @@ This method of building a customized pnglibconf.h is illustrated in
|
|||||||
contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and
|
contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and
|
||||||
pngusr.dfa in these directories.
|
pngusr.dfa in these directories.
|
||||||
|
|
||||||
C. Configuration using PNG_USR_CONFIG
|
C. Configuration using PNG_USER_CONFIG
|
||||||
|
|
||||||
If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
|
If -DPNG_USER_CONFIG is added to the CPPFLAGS when pnglibconf.h is built,
|
||||||
pngusr.h will automatically be included before the options in
|
the file pngusr.h will automatically be included before the options in
|
||||||
scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only
|
scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only
|
||||||
macro definitions turning features on or off or setting settings.
|
macro definitions turning features on or off or setting settings.
|
||||||
|
|
||||||
@@ -707,7 +707,7 @@ situations:
|
|||||||
system expects data with no gamma encoding.
|
system expects data with no gamma encoding.
|
||||||
|
|
||||||
You would use the linear (unencoded) value if you need to process the pixel
|
You would use the linear (unencoded) value if you need to process the pixel
|
||||||
values further because this avoids the need to decode and reencode each
|
values further because this avoids the need to decode and re-encode each
|
||||||
component value whenever arithmetic is performed. A lot of graphics software
|
component value whenever arithmetic is performed. A lot of graphics software
|
||||||
uses linear values for this reason, often with higher precision component values
|
uses linear values for this reason, often with higher precision component values
|
||||||
to preserve overall accuracy.
|
to preserve overall accuracy.
|
||||||
@@ -2248,7 +2248,7 @@ For a more compact example of reading a PNG image, see the file example.c.
|
|||||||
|
|
||||||
Reading PNG files progressively
|
Reading PNG files progressively
|
||||||
|
|
||||||
The progressive reader is slightly different then the non-progressive
|
The progressive reader is slightly different from the non-progressive
|
||||||
reader. Instead of calling png_read_info(), png_read_rows(), and
|
reader. Instead of calling png_read_info(), png_read_rows(), and
|
||||||
png_read_end(), you make one call to png_process_data(), which calls
|
png_read_end(), you make one call to png_process_data(), which calls
|
||||||
callbacks when it has the info, a row, or the end of the image. You
|
callbacks when it has the info, a row, or the end of the image. You
|
||||||
@@ -3495,14 +3495,11 @@ clears the newly allocated memory to zero; note that png_calloc(png_ptr, size)
|
|||||||
is not the same as the calloc(number, size) function provided by stdlib.h.
|
is not the same as the calloc(number, size) function provided by stdlib.h.
|
||||||
There is limited support for certain systems with segmented memory
|
There is limited support for certain systems with segmented memory
|
||||||
architectures and the types of pointers declared by png.h match this; you
|
architectures and the types of pointers declared by png.h match this; you
|
||||||
will have to use appropriate pointers in your application. Since it is
|
will have to use appropriate pointers in your application. If you prefer
|
||||||
unlikely that the method of handling memory allocation on a platform
|
to use a different method of allocating and freeing data, you can use
|
||||||
will change between applications, these functions must be modified in
|
png_create_read_struct_2() or png_create_write_struct_2() to register your
|
||||||
the library at compile time. If you prefer to use a different method
|
own functions as described above. These functions also provide a void
|
||||||
of allocating and freeing data, you can use png_create_read_struct_2() or
|
pointer that can be retrieved via
|
||||||
png_create_write_struct_2() to register your own functions as described
|
|
||||||
above. These functions also provide a void pointer that can be retrieved
|
|
||||||
via
|
|
||||||
|
|
||||||
mem_ptr=png_get_mem_ptr(png_ptr);
|
mem_ptr=png_get_mem_ptr(png_ptr);
|
||||||
|
|
||||||
@@ -3605,6 +3602,15 @@ compiler documentation for more details. For an alternative approach, you
|
|||||||
may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
|
may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
|
||||||
which is illustrated in pngvalid.c and in contrib/visupng.
|
which is illustrated in pngvalid.c and in contrib/visupng.
|
||||||
|
|
||||||
|
Beginning in libpng-1.4.0, the png_set_benign_errors() API became available.
|
||||||
|
You can use this to handle certain errors (normally handled as errors)
|
||||||
|
as warnings.
|
||||||
|
|
||||||
|
png_set_benign_errors (png_ptr, int allowed);
|
||||||
|
|
||||||
|
allowed: 0: treat png_benign_error() as an error.
|
||||||
|
1: treat png_benign_error() as a warning.
|
||||||
|
|
||||||
Custom chunks
|
Custom chunks
|
||||||
|
|
||||||
If you need to read or write custom chunks, you may need to get deeper
|
If you need to read or write custom chunks, you may need to get deeper
|
||||||
@@ -3633,29 +3639,6 @@ the simpler ones to get an idea of how they work. Try to find a similar
|
|||||||
transformation to the one you want to add and copy off of it. More details
|
transformation to the one you want to add and copy off of it. More details
|
||||||
can be found in the comments inside the code itself.
|
can be found in the comments inside the code itself.
|
||||||
|
|
||||||
Configuring for 16-bit platforms
|
|
||||||
|
|
||||||
You will want to look into zconf.h to tell zlib (and thus libpng) that
|
|
||||||
it cannot allocate more then 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.
|
|
||||||
|
|
||||||
Configuring for DOS
|
|
||||||
|
|
||||||
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()
|
|
||||||
call. See zlib.h or zconf.h in the zlib library for more information.
|
|
||||||
|
|
||||||
Configuring for Medium Model
|
|
||||||
|
|
||||||
Libpng's support for medium model has been tested on most of the popular
|
|
||||||
compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
|
|
||||||
defined, and FAR gets defined to far in pngconf.h, and you should be
|
|
||||||
all set. Everything in the library (except for zlib's structure) is
|
|
||||||
expecting far data. You must use the typedefs with the p or pp on
|
|
||||||
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 *".
|
|
||||||
|
|
||||||
Configuring for gui/windowing platforms:
|
Configuring for gui/windowing platforms:
|
||||||
|
|
||||||
You will need to write new error and warning functions that use the GUI
|
You will need to write new error and warning functions that use the GUI
|
||||||
@@ -3665,18 +3648,6 @@ in order to have them available during the structure initialization.
|
|||||||
They can be changed later via png_set_error_fn(). On some compilers,
|
They can be changed later via png_set_error_fn(). On some compilers,
|
||||||
you may also have to change the memory allocators (png_malloc, etc.).
|
you may also have to change the memory allocators (png_malloc, etc.).
|
||||||
|
|
||||||
Configuring for compiler xxx:
|
|
||||||
|
|
||||||
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.
|
|
||||||
The includes that are not needed outside libpng are placed in pngpriv.h,
|
|
||||||
which is only used by the routines inside libpng itself.
|
|
||||||
The files in libpng proper only include pngpriv.h and png.h, which
|
|
||||||
in turn includes pngconf.h and, as of libpng-1.5.0, pnglibconf.h.
|
|
||||||
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
|
|
||||||
that previously appeared in the public headers.
|
|
||||||
|
|
||||||
Configuring zlib:
|
Configuring zlib:
|
||||||
|
|
||||||
There are special functions to configure the compression. Perhaps the
|
There are special functions to configure the compression. Perhaps the
|
||||||
@@ -3718,6 +3689,8 @@ zlib.h for more information on what these mean.
|
|||||||
|
|
||||||
png_set_compression_method(png_ptr, method);
|
png_set_compression_method(png_ptr, method);
|
||||||
|
|
||||||
|
This controls the size of the IDAT chunks (default 8192):
|
||||||
|
|
||||||
png_set_compression_buffer_size(png_ptr, size);
|
png_set_compression_buffer_size(png_ptr, size);
|
||||||
|
|
||||||
As of libpng version 1.5.4, additional APIs became
|
As of libpng version 1.5.4, additional APIs became
|
||||||
@@ -3816,46 +3789,6 @@ Note that the numbers above were invented purely for this example and
|
|||||||
are given only to help explain the function usage. Little testing has
|
are given only to help explain the function usage. Little testing has
|
||||||
been done to find optimum values for either the costs or the weights.
|
been done to find optimum values for either the costs or the weights.
|
||||||
|
|
||||||
Removing unwanted object code
|
|
||||||
|
|
||||||
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
|
|
||||||
never going to use a capability, you can change the #define to #undef
|
|
||||||
before recompiling libpng and save yourself code and data space, or
|
|
||||||
you can turn off individual capabilities with defines that begin with
|
|
||||||
PNG_NO_.
|
|
||||||
|
|
||||||
In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead.
|
|
||||||
|
|
||||||
You can also turn all of the transforms and ancillary chunk capabilities
|
|
||||||
off en masse with compiler directives that define
|
|
||||||
PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
|
|
||||||
or all four,
|
|
||||||
along with directives to turn on any of the capabilities that you do
|
|
||||||
want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra
|
|
||||||
transformations but still leave the library fully capable of reading
|
|
||||||
and writing PNG files with all known public chunks. Use of the
|
|
||||||
PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library
|
|
||||||
that is incapable of reading or writing ancillary chunks. If you are
|
|
||||||
not using the progressive reading capability, you can turn that off
|
|
||||||
with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING
|
|
||||||
capability, which you'll still have).
|
|
||||||
|
|
||||||
All the reading and writing specific code are in separate files, so the
|
|
||||||
linker should only grab the files it needs. However, if you want to
|
|
||||||
make sure, or if you are building a stand alone library, all the
|
|
||||||
reading files start with "pngr" and all the writing files start with "pngw".
|
|
||||||
The files that don't match either (like png.c, pngtrans.c, etc.)
|
|
||||||
are used for both reading and writing, and always need to be included.
|
|
||||||
The progressive reader is in pngpread.c
|
|
||||||
|
|
||||||
If you are creating or distributing a dynamically linked library (a .so
|
|
||||||
or DLL file), you should not remove or disable any parts of the library,
|
|
||||||
as this will cause applications linked with different versions of the
|
|
||||||
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
|
|
||||||
those sections that are actually used will be loaded into memory.
|
|
||||||
|
|
||||||
Requesting debug printout
|
Requesting debug printout
|
||||||
|
|
||||||
The macro definition PNG_DEBUG can be used to request debugging
|
The macro definition PNG_DEBUG can be used to request debugging
|
||||||
@@ -3875,7 +3808,7 @@ the message, "message" is the formatted string to be printed,
|
|||||||
and p1 and p2 are parameters that are to be embedded in the string
|
and p1 and p2 are parameters that are to be embedded in the string
|
||||||
according to printf-style formatting directives. For example,
|
according to printf-style formatting directives. For example,
|
||||||
|
|
||||||
png_debug1(2, "foo=%d\n", foo);
|
png_debug1(2, "foo=%d", foo);
|
||||||
|
|
||||||
is expanded to
|
is expanded to
|
||||||
|
|
||||||
@@ -3955,6 +3888,9 @@ png_set_error_fn(), which is essentially the same function, but with a new
|
|||||||
name to force compilation errors with applications that try to use the old
|
name to force compilation errors with applications that try to use the old
|
||||||
method.
|
method.
|
||||||
|
|
||||||
|
Support for the sCAL, iCCP, iTXt, and sPLT chunks was added at libpng-1.0.6;
|
||||||
|
however, iTXt support was not enabled by default.
|
||||||
|
|
||||||
Starting with version 1.0.7, you can find out which version of the library
|
Starting with version 1.0.7, you can find out which version of the library
|
||||||
you are using at run-time:
|
you are using at run-time:
|
||||||
|
|
||||||
@@ -4171,7 +4107,7 @@ it has not been well tested and doesn't actually "dither".
|
|||||||
The code was not
|
The code was not
|
||||||
removed, however, and could be enabled by building libpng with
|
removed, however, and could be enabled by building libpng with
|
||||||
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
|
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
|
||||||
was reenabled, but the function was renamed png_set_quantize() to
|
was re-enabled, but the function was renamed png_set_quantize() to
|
||||||
reflect more accurately what it actually does. At the same time,
|
reflect more accurately what it actually does. At the same time,
|
||||||
the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
|
the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
|
||||||
PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
|
PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
|
||||||
@@ -4183,16 +4119,26 @@ X. Changes to Libpng from version 1.4.x to 1.5.x
|
|||||||
|
|
||||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
||||||
function) incorrectly returned a value of type png_uint_32.
|
function) incorrectly returned a value of type png_uint_32.
|
||||||
|
The incorrect macro was removed from libpng-1.4.5.
|
||||||
|
|
||||||
Checking for invalid palette index on read or write was added at libpng
|
Checking for invalid palette index on write was added at libpng
|
||||||
1.5.10. When an invalid index is found, libpng issues a benign error.
|
1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues
|
||||||
This is enabled by default but can be disabled in each png_ptr with
|
a benign error. This is enabled by default because this condition is an
|
||||||
|
error according to the PNG specification, Clause 11.3.2, but the error can
|
||||||
|
be ignored in each png_ptr with
|
||||||
|
|
||||||
png_set_check_for_invalid_index(png_ptr, allowed);
|
png_set_check_for_invalid_index(png_ptr, allowed);
|
||||||
|
|
||||||
allowed - one of
|
allowed - one of
|
||||||
0: disable
|
0: disable benign error (accept the
|
||||||
1: enable
|
invalid data without warning).
|
||||||
|
1: enable benign error (treat the
|
||||||
|
invalid data as an error or a
|
||||||
|
warning).
|
||||||
|
|
||||||
|
If the error is ignored, or if png_benign_error() treats it as a warning,
|
||||||
|
any invalid pixels are decoded as opaque black by the decoder and written
|
||||||
|
as-is by the encoder.
|
||||||
|
|
||||||
Retrieving the maximum palette index found was added at libpng-1.5.15.
|
Retrieving the maximum palette index found was added at libpng-1.5.15.
|
||||||
This statement must appear after png_read_png() or png_read_image() while
|
This statement must appear after png_read_png() or png_read_image() while
|
||||||
@@ -4206,17 +4152,16 @@ does not account for any palette index used by ancillary chunks such as the
|
|||||||
bKGD chunk; you must check those separately to determine the maximum
|
bKGD chunk; you must check those separately to determine the maximum
|
||||||
palette index actually used.
|
palette index actually used.
|
||||||
|
|
||||||
A. Changes that affect users of libpng
|
|
||||||
|
|
||||||
There are no substantial API changes between the non-deprecated parts of
|
There are no substantial API changes between the non-deprecated parts of
|
||||||
the 1.4.5 API and the 1.5.0 API; however, the ability to directly access
|
the 1.4.5 API and the 1.5.0 API; however, the ability to directly access
|
||||||
members of the main libpng control structures, png_struct and png_info,
|
members of the main libpng control structures, png_struct and png_info,
|
||||||
deprecated in earlier versions of libpng, has been completely removed from
|
deprecated in earlier versions of libpng, has been completely removed from
|
||||||
libpng 1.5.
|
libpng 1.5.
|
||||||
|
|
||||||
We no longer include zlib.h in png.h. Applications that need access
|
We no longer include zlib.h in png.h. The include statement has been moved
|
||||||
to information in zlib.h will need to add the '#include "zlib.h"'
|
to pngstruct.h, where it is not accessible by applications. Applications that
|
||||||
directive. It does not matter whether it is placed prior to or after
|
need access to information in zlib.h will need to add the '#include "zlib.h"'
|
||||||
|
directive. It does not matter whether this is placed prior to or after
|
||||||
the '"#include png.h"' directive.
|
the '"#include png.h"' directive.
|
||||||
|
|
||||||
The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used
|
The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used
|
||||||
@@ -4277,7 +4222,10 @@ and the accuracy of PNG fixed point values is insufficient for
|
|||||||
representation of these values. Consequently a "string" API
|
representation of these values. Consequently a "string" API
|
||||||
(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
|
(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
|
||||||
arbitrary sCAL chunks in the absence of either the floating point API or
|
arbitrary sCAL chunks in the absence of either the floating point API or
|
||||||
internal floating point calculations.
|
internal floating point calculations. Starting with libpng-1.5.0, both
|
||||||
|
of these functions are present when PNG_sCAL_SUPPORTED is defined. Prior
|
||||||
|
to libpng-1.5.0, their presence also depended upon PNG_FIXED_POINT_SUPPORTED
|
||||||
|
being defined and PNG_FLOATING_POINT_SUPPORTED not being defined.
|
||||||
|
|
||||||
Applications no longer need to include the optional distribution header
|
Applications no longer need to include the optional distribution header
|
||||||
file pngusr.h or define the corresponding macros during application
|
file pngusr.h or define the corresponding macros during application
|
||||||
@@ -4297,15 +4245,10 @@ reset by pngusr.h or by explicit settings on the compiler command line.
|
|||||||
These settings may produce compiler warnings or errors in 1.5.0 because
|
These settings may produce compiler warnings or errors in 1.5.0 because
|
||||||
of macro redefinition.
|
of macro redefinition.
|
||||||
|
|
||||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
|
||||||
function) incorrectly returned a value of type png_uint_32. libpng 1.5.0
|
|
||||||
is consistent with the implementation in 1.4.5 and 1.2.x (where the macro
|
|
||||||
did not exist.)
|
|
||||||
|
|
||||||
Applications can now choose whether to use these macros or to call the
|
Applications can now choose whether to use these macros or to call the
|
||||||
corresponding function by defining PNG_USE_READ_MACROS or
|
corresponding function by defining PNG_USE_READ_MACROS or
|
||||||
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
||||||
only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0
|
only supported from 1.5.0; defining PNG_NO_USE_READ_MACROS prior to 1.5.0
|
||||||
will lead to a link failure.
|
will lead to a link failure.
|
||||||
|
|
||||||
Prior to libpng-1.5.4, the zlib compressor used the same set of parameters
|
Prior to libpng-1.5.4, the zlib compressor used the same set of parameters
|
||||||
@@ -4319,7 +4262,10 @@ option was off by default, and slightly inaccurate scaling occurred.
|
|||||||
This option can no longer be turned off, and the choice of accurate
|
This option can no longer be turned off, and the choice of accurate
|
||||||
or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8()
|
or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8()
|
||||||
API for accurate scaling or the old png_set_strip_16_to_8() API for simple
|
API for accurate scaling or the old png_set_strip_16_to_8() API for simple
|
||||||
chopping.
|
chopping. In libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||||
|
macro became PNG_READ_SCALE_16_TO_8_SUPPORTED, and the PNG_READ_16_TO_8
|
||||||
|
macro became PNG_READ_STRIP_16_TO_8_SUPPORTED, to enable the two
|
||||||
|
png_set_*_16_to_8() functions separately.
|
||||||
|
|
||||||
Prior to libpng-1.5.4, the png_set_user_limits() function could only be
|
Prior to libpng-1.5.4, the png_set_user_limits() function could only be
|
||||||
used to reduce the width and height limits from the value of
|
used to reduce the width and height limits from the value of
|
||||||
@@ -4341,25 +4287,8 @@ limits are now
|
|||||||
png_user_chunk_cache_max 0 (unlimited) 128
|
png_user_chunk_cache_max 0 (unlimited) 128
|
||||||
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
||||||
|
|
||||||
B. Changes to the build and configuration of libpng
|
The png_set_option() function (and the "options" member of the png struct) was
|
||||||
|
added to libpng-1.5.15.
|
||||||
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
|
|
||||||
majority of library users or builders; however, the few who configure libpng
|
|
||||||
to a non-default feature set may need to change how this is done.
|
|
||||||
|
|
||||||
There should be no need for library builders to alter build scripts if
|
|
||||||
these use the distributed build support - configure or the makefiles -
|
|
||||||
however, users of the makefiles may care to update their build scripts
|
|
||||||
to build pnglibconf.h where the corresponding makefile does not do so.
|
|
||||||
|
|
||||||
Building libpng with a non-default configuration has changed completely.
|
|
||||||
The old method using pngusr.h should still work correctly even though the
|
|
||||||
way pngusr.h is used in the build has been changed; however, library
|
|
||||||
builders will probably want to examine the changes to take advantage of
|
|
||||||
new capabilities and to simplify their build system.
|
|
||||||
|
|
||||||
B.1 Specific changes to library configuration capabilities
|
|
||||||
|
|
||||||
The library now supports a complete fixed point implementation and can
|
The library now supports a complete fixed point implementation and can
|
||||||
thus be used on systems that have no floating point support or very
|
thus be used on systems that have no floating point support or very
|
||||||
@@ -4371,27 +4300,7 @@ independent of the choice of fixed versus floating point APIs and all the
|
|||||||
missing fixed point APIs have been implemented.
|
missing fixed point APIs have been implemented.
|
||||||
|
|
||||||
The exact mechanism used to control attributes of API functions has
|
The exact mechanism used to control attributes of API functions has
|
||||||
changed. A single set of operating system independent macro definitions
|
changed, as described in the INSTALL file.
|
||||||
is used and operating system specific directives are defined in
|
|
||||||
pnglibconf.h
|
|
||||||
|
|
||||||
As part of this the mechanism used to choose procedure call standards on
|
|
||||||
those systems that allow a choice has been changed. At present this only
|
|
||||||
affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
|
|
||||||
running on Intel processors. As before, PNGAPI is defined where required
|
|
||||||
to control the exported API functions; however, two new macros, PNGCBAPI
|
|
||||||
and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
|
|
||||||
(PNGCAPI) for functions that must match a C library prototype (currently
|
|
||||||
only png_longjmp_ptr, which must match the C longjmp function.) The new
|
|
||||||
approach is documented in pngconf.h
|
|
||||||
|
|
||||||
Despite these changes, libpng 1.5.0 only supports the native C function
|
|
||||||
calling standard on those platforms tested so far (__cdecl on Microsoft
|
|
||||||
Windows). This is because the support requirements for alternative
|
|
||||||
calling conventions seem to no longer exist. Developers who find it
|
|
||||||
necessary to set PNG_API_RULE to 1 should advise the mailing list
|
|
||||||
(png-mng-implement) of this and library builders who use Openwatcom and
|
|
||||||
therefore set PNG_API_RULE to 2 should also contact the mailing list.
|
|
||||||
|
|
||||||
A new test program, pngvalid, is provided in addition to pngtest.
|
A new test program, pngvalid, is provided in addition to pngtest.
|
||||||
pngvalid validates the arithmetic accuracy of the gamma correction
|
pngvalid validates the arithmetic accuracy of the gamma correction
|
||||||
@@ -4467,46 +4376,6 @@ even though the default is to use the macros - this allows applications
|
|||||||
to choose at app buildtime whether or not to use macros (previously
|
to choose at app buildtime whether or not to use macros (previously
|
||||||
impossible because the functions weren't in the default build.)
|
impossible because the functions weren't in the default build.)
|
||||||
|
|
||||||
B.2 Changes to the configuration mechanism
|
|
||||||
|
|
||||||
Prior to libpng-1.5.0 library builders who needed to configure libpng
|
|
||||||
had either to modify the exported pngconf.h header file to add system
|
|
||||||
specific configuration or had to write feature selection macros into
|
|
||||||
pngusr.h and cause this to be included into pngconf.h by defining
|
|
||||||
PNG_USER_CONFIG. The latter mechanism had the disadvantage that an
|
|
||||||
application built without PNG_USER_CONFIG defined would see the
|
|
||||||
unmodified, default, libpng API and thus would probably fail to link.
|
|
||||||
|
|
||||||
These mechanisms still work in the configure build and in any makefile
|
|
||||||
build that builds pnglibconf.h, although the feature selection macros
|
|
||||||
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
|
||||||
processed only once, when the exported header file pnglibconf.h is built.
|
|
||||||
pngconf.h no longer includes pngusr.h, therefore pngusr.h is ignored after the
|
|
||||||
build of pnglibconf.h and it is never included in an application build.
|
|
||||||
|
|
||||||
The rarely used alternative of adding a list of feature macros to the
|
|
||||||
CFLAGS setting in the build also still works; however, the macros will be
|
|
||||||
copied to pnglibconf.h and this may produce macro redefinition warnings
|
|
||||||
when the individual C files are compiled.
|
|
||||||
|
|
||||||
All configuration now only works if pnglibconf.h is built from
|
|
||||||
scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan
|
|
||||||
(the original author of awk) maintains C source code of that awk and this
|
|
||||||
and all known later implementations (often called by subtly different
|
|
||||||
names - nawk and gawk for example) are adequate to build pnglibconf.h.
|
|
||||||
The Sun Microsystems (now Oracle) program 'awk' is an earlier version
|
|
||||||
and does not work; this may also apply to other systems that have a
|
|
||||||
functioning awk called 'nawk'.
|
|
||||||
|
|
||||||
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
|
||||||
file also includes dependency information that ensures a configuration is
|
|
||||||
consistent; that is, if a feature is switched off dependent features are
|
|
||||||
also removed. As a recommended alternative to using feature macros in
|
|
||||||
pngusr.h a system builder may also define equivalent options in pngusr.dfa
|
|
||||||
(or, indeed, any file) and add that to the configuration by setting
|
|
||||||
DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate
|
|
||||||
how to do this, and a case where pngusr.h is still required.
|
|
||||||
|
|
||||||
XI. Detecting libpng
|
XI. Detecting libpng
|
||||||
|
|
||||||
The png_get_io_ptr() function has been present since libpng-0.88, has never
|
The png_get_io_ptr() function has been present since libpng-0.88, has never
|
||||||
@@ -4542,7 +4411,8 @@ mailing list, or directly to glennrp.
|
|||||||
|
|
||||||
XIII. Coding style
|
XIII. Coding style
|
||||||
|
|
||||||
Our coding style is similar to the "Allman" style, with curly
|
Our coding style is similar to the "Allman" style
|
||||||
|
(See http://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
|
||||||
braces on separate lines:
|
braces on separate lines:
|
||||||
|
|
||||||
if (condition)
|
if (condition)
|
||||||
@@ -4647,6 +4517,12 @@ with "defined".
|
|||||||
We prefer to express integers that are used as bit masks in hex format,
|
We prefer to express integers that are used as bit masks in hex format,
|
||||||
with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100).
|
with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100).
|
||||||
|
|
||||||
|
We prefer to use underscores in variable names rather than camelCase, except
|
||||||
|
for a few type names that we inherit from zlib.h.
|
||||||
|
|
||||||
|
We prefer "if (something != 0)" and "if (something == 0)"
|
||||||
|
over "if (something)" and if "(!something)", respectively.
|
||||||
|
|
||||||
We do not use the TAB character for indentation in the C sources.
|
We do not use the TAB character for indentation in the C sources.
|
||||||
|
|
||||||
Lines do not exceed 80 characters.
|
Lines do not exceed 80 characters.
|
||||||
@@ -4655,13 +4531,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XIV. Y2K Compliance in libpng
|
XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
May 23, 2013
|
December 22, 2014
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.5.16 are Y2K compliant. It is my belief that earlier
|
upward through 1.5.21 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has two year fields. One is a 2-byte unsigned integer that
|
Libpng only has two year fields. One is a 2-byte unsigned integer that
|
||||||
|
|||||||
322
libpng.3
322
libpng.3
@@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNG 3 "May 23, 2013"
|
.TH LIBPNG 3 "December 22, 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.16
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.21
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB
|
\fB
|
||||||
#include <png.h>\fP
|
#include <png.h>\fP
|
||||||
@@ -492,10 +492,10 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
Libpng-manual.txt - A description on how to use and modify libpng
|
Libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.5.16 - May 23, 2013
|
libpng version 1.5.21 - December 22, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 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
|
||||||
@@ -503,9 +503,9 @@ Libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.16 - May 23, 2013
|
libpng versions 0.97, January 1998, through 1.5.21 - December 22, 2014
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
|
|
||||||
libpng 1.0 beta 6 version 0.96 May 28, 1997
|
libpng 1.0 beta 6 version 0.96 May 28, 1997
|
||||||
Updated and distributed by Andreas Dilger
|
Updated and distributed by Andreas Dilger
|
||||||
@@ -641,7 +641,7 @@ All APIs that take (double) arguments also have a matching API that
|
|||||||
takes the corresponding fixed point integer arguments. The fixed point
|
takes the corresponding fixed point integer arguments. The fixed point
|
||||||
API has the same name as the floating point one with "_fixed" appended.
|
API has the same name as the floating point one with "_fixed" appended.
|
||||||
The actual range of values permitted in the APIs is frequently less than
|
The actual range of values permitted in the APIs is frequently less than
|
||||||
the full range of (png_fixed_point) (-21474 to +21474). When APIs require
|
the full range of (png_fixed_point) (\-21474 to +21474). When APIs require
|
||||||
a non-negative argument the type is recorded as png_uint_32 above. Consult
|
a non-negative argument the type is recorded as png_uint_32 above. Consult
|
||||||
the header file and the text below for more information.
|
the header file and the text below for more information.
|
||||||
|
|
||||||
@@ -682,7 +682,7 @@ The easiest way to make minor changes to the libpng configuration when
|
|||||||
auto-configuration is supported is to add definitions to the command line
|
auto-configuration is supported is to add definitions to the command line
|
||||||
using (typically) CPPFLAGS. For example:
|
using (typically) CPPFLAGS. For example:
|
||||||
|
|
||||||
CPPFLAGS=-DPNG_NO_FLOATING_ARITHMETIC
|
CPPFLAGS=\-DPNG_NO_FLOATING_ARITHMETIC
|
||||||
|
|
||||||
will change the internal libpng math implementation for gamma correction and
|
will change the internal libpng math implementation for gamma correction and
|
||||||
other arithmetic calculations to fixed point, avoiding the need for fast
|
other arithmetic calculations to fixed point, avoiding the need for fast
|
||||||
@@ -690,7 +690,7 @@ floating point support. The result can be seen in the generated pnglibconf.h -
|
|||||||
make sure it contains the changed feature macro setting.
|
make sure it contains the changed feature macro setting.
|
||||||
|
|
||||||
If you need to make more extensive configuration changes - more than one or two
|
If you need to make more extensive configuration changes - more than one or two
|
||||||
feature macro settings - you can either add -DPNG_USER_CONFIG to the build
|
feature macro settings - you can either add \-DPNG_USER_CONFIG to the build
|
||||||
command line and put a list of feature macro settings in pngusr.h or you can set
|
command line and put a list of feature macro settings in pngusr.h or you can set
|
||||||
DFA_XTRA (a makefile variable) to a file containing the same information in the
|
DFA_XTRA (a makefile variable) to a file containing the same information in the
|
||||||
form of 'option' settings.
|
form of 'option' settings.
|
||||||
@@ -747,10 +747,10 @@ This method of building a customized pnglibconf.h is illustrated in
|
|||||||
contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and
|
contrib/pngminim/*. See the "$(PNGCONF):" target in the makefile and
|
||||||
pngusr.dfa in these directories.
|
pngusr.dfa in these directories.
|
||||||
|
|
||||||
C. Configuration using PNG_USR_CONFIG
|
C. Configuration using PNG_USER_CONFIG
|
||||||
|
|
||||||
If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
|
If \-DPNG_USER_CONFIG is added to the CPPFLAGS when pnglibconf.h is built,
|
||||||
pngusr.h will automatically be included before the options in
|
the file pngusr.h will automatically be included before the options in
|
||||||
scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only
|
scripts/pnglibconf.dfa are processed. Your pngusr.h file should contain only
|
||||||
macro definitions turning features on or off or setting settings.
|
macro definitions turning features on or off or setting settings.
|
||||||
|
|
||||||
@@ -979,7 +979,7 @@ input stream. You must supply the function
|
|||||||
unknown chunk structure, process it, and return one
|
unknown chunk structure, process it, and return one
|
||||||
of the following: */
|
of the following: */
|
||||||
|
|
||||||
return (-n); /* chunk had an error */
|
return (\-n); /* chunk had an error */
|
||||||
return (0); /* did not recognize */
|
return (0); /* did not recognize */
|
||||||
return (n); /* success */
|
return (n); /* success */
|
||||||
}
|
}
|
||||||
@@ -1024,7 +1024,7 @@ non-interlaced case the row that was just handled is simply one less than the
|
|||||||
passed in row number, and pass will always be 0. For the interlaced case the
|
passed in row number, and pass will always be 0. For the interlaced case the
|
||||||
same applies unless the row value is 0, in which case the row just handled was
|
same applies unless the row value is 0, in which case the row just handled was
|
||||||
the last one from one of the preceding passes. Because interlacing may skip a
|
the last one from one of the preceding passes. Because interlacing may skip a
|
||||||
pass you cannot be sure that the preceding pass is just 'pass-1', if you really
|
pass you cannot be sure that the preceding pass is just 'pass\-1', if you really
|
||||||
need to know what the last pass is record (row,pass) from the callback and use
|
need to know what the last pass is record (row,pass) from the callback and use
|
||||||
the last recorded value each time.
|
the last recorded value each time.
|
||||||
|
|
||||||
@@ -1110,7 +1110,7 @@ callback function:
|
|||||||
.SS User limits
|
.SS User limits
|
||||||
|
|
||||||
The PNG specification allows the width and height of an image to be as
|
The PNG specification allows the width and height of an image to be as
|
||||||
large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns.
|
large as 2^(31\-1 (0x7fffffff), or about 2.147 billion rows and columns.
|
||||||
Since very few applications really need to process such large images,
|
Since very few applications really need to process such large images,
|
||||||
we have imposed an arbitrary 1-million limit on rows and columns.
|
we have imposed an arbitrary 1-million limit on rows and columns.
|
||||||
Larger images will be rejected immediately with a png_error() call. If
|
Larger images will be rejected immediately with a png_error() call. If
|
||||||
@@ -1199,7 +1199,7 @@ situations:
|
|||||||
system expects data with no gamma encoding.
|
system expects data with no gamma encoding.
|
||||||
|
|
||||||
You would use the linear (unencoded) value if you need to process the pixel
|
You would use the linear (unencoded) value if you need to process the pixel
|
||||||
values further because this avoids the need to decode and reencode each
|
values further because this avoids the need to decode and re-encode each
|
||||||
component value whenever arithmetic is performed. A lot of graphics software
|
component value whenever arithmetic is performed. A lot of graphics software
|
||||||
uses linear values for this reason, often with higher precision component values
|
uses linear values for this reason, often with higher precision component values
|
||||||
to preserve overall accuracy.
|
to preserve overall accuracy.
|
||||||
@@ -2670,13 +2670,13 @@ point to libpng-allocated storage with the following function:
|
|||||||
or simply PNG_FREE_ALL
|
or simply PNG_FREE_ALL
|
||||||
|
|
||||||
seq - sequence number of item to be freed
|
seq - sequence number of item to be freed
|
||||||
(-1 for all items)
|
(\-1 for all items)
|
||||||
|
|
||||||
This function may be safely called when the relevant storage has
|
This function may be safely called when the relevant storage has
|
||||||
already been freed, or has not yet been allocated, or was allocated
|
already been freed, or has not yet been allocated, or was allocated
|
||||||
by the user and not by libpng, and will in those cases do nothing.
|
by the user and not by libpng, and will in those cases do nothing.
|
||||||
The "seq" parameter is ignored if only one item of the selected data
|
The "seq" parameter is ignored if only one item of the selected data
|
||||||
type, such as PLTE, is allowed. If "seq" is not -1, and multiple items
|
type, such as PLTE, is allowed. If "seq" is not \-1, and multiple items
|
||||||
are allowed for the data type identified in the mask, such as text or
|
are allowed for the data type identified in the mask, such as text or
|
||||||
sPLT, only the n'th item in the structure is freed, where n is "seq".
|
sPLT, only the n'th item in the structure is freed, where n is "seq".
|
||||||
|
|
||||||
@@ -2740,7 +2740,7 @@ For a more compact example of reading a PNG image, see the file example.c.
|
|||||||
|
|
||||||
.SS Reading PNG files progressively
|
.SS Reading PNG files progressively
|
||||||
|
|
||||||
The progressive reader is slightly different then the non-progressive
|
The progressive reader is slightly different from the non-progressive
|
||||||
reader. Instead of calling png_read_info(), png_read_rows(), and
|
reader. Instead of calling png_read_info(), png_read_rows(), and
|
||||||
png_read_end(), you make one call to png_process_data(), which calls
|
png_read_end(), you make one call to png_process_data(), which calls
|
||||||
callbacks when it has the info, a row, or the end of the image. You
|
callbacks when it has the info, a row, or the end of the image. You
|
||||||
@@ -3063,7 +3063,7 @@ non-interlaced case the row that was just handled is simply one less than the
|
|||||||
passed in row number, and pass will always be 0. For the interlaced case the
|
passed in row number, and pass will always be 0. For the interlaced case the
|
||||||
same applies unless the row value is 0, in which case the row just handled was
|
same applies unless the row value is 0, in which case the row just handled was
|
||||||
the last one from one of the preceding passes. Because interlacing may skip a
|
the last one from one of the preceding passes. Because interlacing may skip a
|
||||||
pass you cannot be sure that the preceding pass is just 'pass-1', if you really
|
pass you cannot be sure that the preceding pass is just 'pass\-1', if you really
|
||||||
need to know what the last pass is record (row,pass) from the callback and use
|
need to know what the last pass is record (row,pass) from the callback and use
|
||||||
the last recorded value each time.
|
the last recorded value each time.
|
||||||
|
|
||||||
@@ -3900,13 +3900,13 @@ point to libpng-allocated storage with the following function:
|
|||||||
or simply PNG_FREE_ALL
|
or simply PNG_FREE_ALL
|
||||||
|
|
||||||
seq - sequence number of item to be freed
|
seq - sequence number of item to be freed
|
||||||
(-1 for all items)
|
(\-1 for all items)
|
||||||
|
|
||||||
This function may be safely called when the relevant storage has
|
This function may be safely called when the relevant storage has
|
||||||
already been freed, or has not yet been allocated, or was allocated
|
already been freed, or has not yet been allocated, or was allocated
|
||||||
by the user and not by libpng, and will in those cases do nothing.
|
by the user and not by libpng, and will in those cases do nothing.
|
||||||
The "seq" parameter is ignored if only one item of the selected data
|
The "seq" parameter is ignored if only one item of the selected data
|
||||||
type, such as PLTE, is allowed. If "seq" is not -1, and multiple items
|
type, such as PLTE, is allowed. If "seq" is not \-1, and multiple items
|
||||||
are allowed for the data type identified in the mask, such as text or
|
are allowed for the data type identified in the mask, such as text or
|
||||||
sPLT, only the n'th item in the structure is freed, where n is "seq".
|
sPLT, only the n'th item in the structure is freed, where n is "seq".
|
||||||
|
|
||||||
@@ -3987,14 +3987,11 @@ clears the newly allocated memory to zero; note that png_calloc(png_ptr, size)
|
|||||||
is not the same as the calloc(number, size) function provided by stdlib.h.
|
is not the same as the calloc(number, size) function provided by stdlib.h.
|
||||||
There is limited support for certain systems with segmented memory
|
There is limited support for certain systems with segmented memory
|
||||||
architectures and the types of pointers declared by png.h match this; you
|
architectures and the types of pointers declared by png.h match this; you
|
||||||
will have to use appropriate pointers in your application. Since it is
|
will have to use appropriate pointers in your application. If you prefer
|
||||||
unlikely that the method of handling memory allocation on a platform
|
to use a different method of allocating and freeing data, you can use
|
||||||
will change between applications, these functions must be modified in
|
png_create_read_struct_2() or png_create_write_struct_2() to register your
|
||||||
the library at compile time. If you prefer to use a different method
|
own functions as described above. These functions also provide a void
|
||||||
of allocating and freeing data, you can use png_create_read_struct_2() or
|
pointer that can be retrieved via
|
||||||
png_create_write_struct_2() to register your own functions as described
|
|
||||||
above. These functions also provide a void pointer that can be retrieved
|
|
||||||
via
|
|
||||||
|
|
||||||
mem_ptr=png_get_mem_ptr(png_ptr);
|
mem_ptr=png_get_mem_ptr(png_ptr);
|
||||||
|
|
||||||
@@ -4097,6 +4094,15 @@ compiler documentation for more details. For an alternative approach, you
|
|||||||
may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
|
may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
|
||||||
which is illustrated in pngvalid.c and in contrib/visupng.
|
which is illustrated in pngvalid.c and in contrib/visupng.
|
||||||
|
|
||||||
|
Beginning in libpng-1.4.0, the png_set_benign_errors() API became available.
|
||||||
|
You can use this to handle certain errors (normally handled as errors)
|
||||||
|
as warnings.
|
||||||
|
|
||||||
|
png_set_benign_errors (png_ptr, int allowed);
|
||||||
|
|
||||||
|
allowed: 0: treat png_benign_error() as an error.
|
||||||
|
1: treat png_benign_error() as a warning.
|
||||||
|
|
||||||
.SS Custom chunks
|
.SS Custom chunks
|
||||||
|
|
||||||
If you need to read or write custom chunks, you may need to get deeper
|
If you need to read or write custom chunks, you may need to get deeper
|
||||||
@@ -4125,29 +4131,6 @@ the simpler ones to get an idea of how they work. Try to find a similar
|
|||||||
transformation to the one you want to add and copy off of it. More details
|
transformation to the one you want to add and copy off of it. More details
|
||||||
can be found in the comments inside the code itself.
|
can be found in the comments inside the code itself.
|
||||||
|
|
||||||
.SS Configuring for 16-bit platforms
|
|
||||||
|
|
||||||
You will want to look into zconf.h to tell zlib (and thus libpng) that
|
|
||||||
it cannot allocate more then 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.
|
|
||||||
|
|
||||||
.SS Configuring for DOS
|
|
||||||
|
|
||||||
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()
|
|
||||||
call. See zlib.h or zconf.h in the zlib library for more information.
|
|
||||||
|
|
||||||
.SS Configuring for Medium Model
|
|
||||||
|
|
||||||
Libpng's support for medium model has been tested on most of the popular
|
|
||||||
compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets
|
|
||||||
defined, and FAR gets defined to far in pngconf.h, and you should be
|
|
||||||
all set. Everything in the library (except for zlib's structure) is
|
|
||||||
expecting far data. You must use the typedefs with the p or pp on
|
|
||||||
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 *".
|
|
||||||
|
|
||||||
.SS Configuring for gui/windowing platforms:
|
.SS Configuring for gui/windowing platforms:
|
||||||
|
|
||||||
You will need to write new error and warning functions that use the GUI
|
You will need to write new error and warning functions that use the GUI
|
||||||
@@ -4157,19 +4140,6 @@ in order to have them available during the structure initialization.
|
|||||||
They can be changed later via png_set_error_fn(). On some compilers,
|
They can be changed later via png_set_error_fn(). On some compilers,
|
||||||
you may also have to change the memory allocators (png_malloc, etc.).
|
you may also have to change the memory allocators (png_malloc, etc.).
|
||||||
|
|
||||||
.SS Configuring for compiler xxx:
|
|
||||||
|
|
||||||
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.
|
|
||||||
The includes that are not needed outside libpng are placed in pngpriv.h,
|
|
||||||
which is only used by the routines inside libpng itself.
|
|
||||||
The files in libpng proper only include pngpriv.h and png.h, which
|
|
||||||
%14%in turn includes pngconf.h.
|
|
||||||
in turn includes pngconf.h and, as of libpng-1.5.0, pnglibconf.h.
|
|
||||||
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
|
|
||||||
that previously appeared in the public headers.
|
|
||||||
|
|
||||||
.SS Configuring zlib:
|
.SS Configuring zlib:
|
||||||
|
|
||||||
There are special functions to configure the compression. Perhaps the
|
There are special functions to configure the compression. Perhaps the
|
||||||
@@ -4211,6 +4181,8 @@ zlib.h for more information on what these mean.
|
|||||||
|
|
||||||
png_set_compression_method(png_ptr, method);
|
png_set_compression_method(png_ptr, method);
|
||||||
|
|
||||||
|
This controls the size of the IDAT chunks (default 8192):
|
||||||
|
|
||||||
png_set_compression_buffer_size(png_ptr, size);
|
png_set_compression_buffer_size(png_ptr, size);
|
||||||
|
|
||||||
As of libpng version 1.5.4, additional APIs became
|
As of libpng version 1.5.4, additional APIs became
|
||||||
@@ -4309,46 +4281,6 @@ Note that the numbers above were invented purely for this example and
|
|||||||
are given only to help explain the function usage. Little testing has
|
are given only to help explain the function usage. Little testing has
|
||||||
been done to find optimum values for either the costs or the weights.
|
been done to find optimum values for either the costs or the weights.
|
||||||
|
|
||||||
.SS Removing unwanted object code
|
|
||||||
|
|
||||||
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
|
|
||||||
never going to use a capability, you can change the #define to #undef
|
|
||||||
before recompiling libpng and save yourself code and data space, or
|
|
||||||
you can turn off individual capabilities with defines that begin with
|
|
||||||
PNG_NO_.
|
|
||||||
|
|
||||||
In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead.
|
|
||||||
|
|
||||||
You can also turn all of the transforms and ancillary chunk capabilities
|
|
||||||
off en masse with compiler directives that define
|
|
||||||
PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
|
|
||||||
or all four,
|
|
||||||
along with directives to turn on any of the capabilities that you do
|
|
||||||
want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable the extra
|
|
||||||
transformations but still leave the library fully capable of reading
|
|
||||||
and writing PNG files with all known public chunks. Use of the
|
|
||||||
PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive produces a library
|
|
||||||
that is incapable of reading or writing ancillary chunks. If you are
|
|
||||||
not using the progressive reading capability, you can turn that off
|
|
||||||
with PNG_NO_PROGRESSIVE_READ (don't confuse this with the INTERLACING
|
|
||||||
capability, which you'll still have).
|
|
||||||
|
|
||||||
All the reading and writing specific code are in separate files, so the
|
|
||||||
linker should only grab the files it needs. However, if you want to
|
|
||||||
make sure, or if you are building a stand alone library, all the
|
|
||||||
reading files start with "pngr" and all the writing files start with "pngw".
|
|
||||||
The files that don't match either (like png.c, pngtrans.c, etc.)
|
|
||||||
are used for both reading and writing, and always need to be included.
|
|
||||||
The progressive reader is in pngpread.c
|
|
||||||
|
|
||||||
If you are creating or distributing a dynamically linked library (a .so
|
|
||||||
or DLL file), you should not remove or disable any parts of the library,
|
|
||||||
as this will cause applications linked with different versions of the
|
|
||||||
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
|
|
||||||
those sections that are actually used will be loaded into memory.
|
|
||||||
|
|
||||||
.SS Requesting debug printout
|
.SS Requesting debug printout
|
||||||
|
|
||||||
The macro definition PNG_DEBUG can be used to request debugging
|
The macro definition PNG_DEBUG can be used to request debugging
|
||||||
@@ -4368,12 +4300,12 @@ the message, "message" is the formatted string to be printed,
|
|||||||
and p1 and p2 are parameters that are to be embedded in the string
|
and p1 and p2 are parameters that are to be embedded in the string
|
||||||
according to printf-style formatting directives. For example,
|
according to printf-style formatting directives. For example,
|
||||||
|
|
||||||
png_debug1(2, "foo=%d\n", foo);
|
png_debug1(2, "foo=%d", foo);
|
||||||
|
|
||||||
is expanded to
|
is expanded to
|
||||||
|
|
||||||
if (PNG_DEBUG > 2)
|
if (PNG_DEBUG > 2)
|
||||||
fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
|
fprintf(PNG_DEBUG_FILE, "foo=%d\en", foo);
|
||||||
|
|
||||||
When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
|
When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
|
||||||
can still use PNG_DEBUG to control your own debugging:
|
can still use PNG_DEBUG to control your own debugging:
|
||||||
@@ -4448,6 +4380,9 @@ png_set_error_fn(), which is essentially the same function, but with a new
|
|||||||
name to force compilation errors with applications that try to use the old
|
name to force compilation errors with applications that try to use the old
|
||||||
method.
|
method.
|
||||||
|
|
||||||
|
Support for the sCAL, iCCP, iTXt, and sPLT chunks was added at libpng-1.0.6;
|
||||||
|
however, iTXt support was not enabled by default.
|
||||||
|
|
||||||
Starting with version 1.0.7, you can find out which version of the library
|
Starting with version 1.0.7, you can find out which version of the library
|
||||||
you are using at run-time:
|
you are using at run-time:
|
||||||
|
|
||||||
@@ -4664,7 +4599,7 @@ it has not been well tested and doesn't actually "dither".
|
|||||||
The code was not
|
The code was not
|
||||||
removed, however, and could be enabled by building libpng with
|
removed, however, and could be enabled by building libpng with
|
||||||
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
|
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
|
||||||
was reenabled, but the function was renamed png_set_quantize() to
|
was re-enabled, but the function was renamed png_set_quantize() to
|
||||||
reflect more accurately what it actually does. At the same time,
|
reflect more accurately what it actually does. At the same time,
|
||||||
the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
|
the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
|
||||||
PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
|
PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
|
||||||
@@ -4676,16 +4611,26 @@ We removed the trailing '.' from the warning and error messages.
|
|||||||
|
|
||||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
||||||
function) incorrectly returned a value of type png_uint_32.
|
function) incorrectly returned a value of type png_uint_32.
|
||||||
|
The incorrect macro was removed from libpng-1.4.5.
|
||||||
|
|
||||||
Checking for invalid palette index on read or write was added at libpng
|
Checking for invalid palette index on write was added at libpng
|
||||||
1.5.10. When an invalid index is found, libpng issues a benign error.
|
1.5.10. If a pixel contains an invalid (out-of-range) index libpng issues
|
||||||
This is enabled by default but can be disabled in each png_ptr with
|
a benign error. This is enabled by default because this condition is an
|
||||||
|
error according to the PNG specification, Clause 11.3.2, but the error can
|
||||||
|
be ignored in each png_ptr with
|
||||||
|
|
||||||
png_set_check_for_invalid_index(png_ptr, allowed);
|
png_set_check_for_invalid_index(png_ptr, allowed);
|
||||||
|
|
||||||
allowed - one of
|
allowed - one of
|
||||||
0: disable
|
0: disable benign error (accept the
|
||||||
1: enable
|
invalid data without warning).
|
||||||
|
1: enable benign error (treat the
|
||||||
|
invalid data as an error or a
|
||||||
|
warning).
|
||||||
|
|
||||||
|
If the error is ignored, or if png_benign_error() treats it as a warning,
|
||||||
|
any invalid pixels are decoded as opaque black by the decoder and written
|
||||||
|
as-is by the encoder.
|
||||||
|
|
||||||
Retrieving the maximum palette index found was added at libpng-1.5.15.
|
Retrieving the maximum palette index found was added at libpng-1.5.15.
|
||||||
This statement must appear after png_read_png() or png_read_image() while
|
This statement must appear after png_read_png() or png_read_image() while
|
||||||
@@ -4693,23 +4638,22 @@ reading, and after png_write_png() or png_write_image() while writing.
|
|||||||
|
|
||||||
int max_palette = png_get_palette_max(png_ptr, info_ptr);
|
int max_palette = png_get_palette_max(png_ptr, info_ptr);
|
||||||
|
|
||||||
This will return the maximum palette index found in the image, or "-1" if
|
This will return the maximum palette index found in the image, or "\-1" if
|
||||||
the palette was not checked, or "0" if no palette was found. Note that this
|
the palette was not checked, or "0" if no palette was found. Note that this
|
||||||
does not account for any palette index used by ancillary chunks such as the
|
does not account for any palette index used by ancillary chunks such as the
|
||||||
bKGD chunk; you must check those separately to determine the maximum
|
bKGD chunk; you must check those separately to determine the maximum
|
||||||
palette index actually used.
|
palette index actually used.
|
||||||
|
|
||||||
A. Changes that affect users of libpng
|
|
||||||
|
|
||||||
There are no substantial API changes between the non-deprecated parts of
|
There are no substantial API changes between the non-deprecated parts of
|
||||||
the 1.4.5 API and the 1.5.0 API; however, the ability to directly access
|
the 1.4.5 API and the 1.5.0 API; however, the ability to directly access
|
||||||
members of the main libpng control structures, png_struct and png_info,
|
members of the main libpng control structures, png_struct and png_info,
|
||||||
deprecated in earlier versions of libpng, has been completely removed from
|
deprecated in earlier versions of libpng, has been completely removed from
|
||||||
libpng 1.5.
|
libpng 1.5.
|
||||||
|
|
||||||
We no longer include zlib.h in png.h. Applications that need access
|
We no longer include zlib.h in png.h. The include statement has been moved
|
||||||
to information in zlib.h will need to add the '#include "zlib.h"'
|
to pngstruct.h, where it is not accessible by applications. Applications that
|
||||||
directive. It does not matter whether it is placed prior to or after
|
need access to information in zlib.h will need to add the '#include "zlib.h"'
|
||||||
|
directive. It does not matter whether this is placed prior to or after
|
||||||
the '"#include png.h"' directive.
|
the '"#include png.h"' directive.
|
||||||
|
|
||||||
The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used
|
The png_sprintf(), png_strcpy(), and png_strncpy() macros are no longer used
|
||||||
@@ -4770,7 +4714,10 @@ and the accuracy of PNG fixed point values is insufficient for
|
|||||||
representation of these values. Consequently a "string" API
|
representation of these values. Consequently a "string" API
|
||||||
(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
|
(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
|
||||||
arbitrary sCAL chunks in the absence of either the floating point API or
|
arbitrary sCAL chunks in the absence of either the floating point API or
|
||||||
internal floating point calculations.
|
internal floating point calculations. Starting with libpng-1.5.0, both
|
||||||
|
of these functions are present when PNG_sCAL_SUPPORTED is defined. Prior
|
||||||
|
to libpng-1.5.0, their presence also depended upon PNG_FIXED_POINT_SUPPORTED
|
||||||
|
being defined and PNG_FLOATING_POINT_SUPPORTED not being defined.
|
||||||
|
|
||||||
Applications no longer need to include the optional distribution header
|
Applications no longer need to include the optional distribution header
|
||||||
file pngusr.h or define the corresponding macros during application
|
file pngusr.h or define the corresponding macros during application
|
||||||
@@ -4790,15 +4737,10 @@ reset by pngusr.h or by explicit settings on the compiler command line.
|
|||||||
These settings may produce compiler warnings or errors in 1.5.0 because
|
These settings may produce compiler warnings or errors in 1.5.0 because
|
||||||
of macro redefinition.
|
of macro redefinition.
|
||||||
|
|
||||||
From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
|
||||||
function) incorrectly returned a value of type png_uint_32. libpng 1.5.0
|
|
||||||
is consistent with the implementation in 1.4.5 and 1.2.x (where the macro
|
|
||||||
did not exist.)
|
|
||||||
|
|
||||||
Applications can now choose whether to use these macros or to call the
|
Applications can now choose whether to use these macros or to call the
|
||||||
corresponding function by defining PNG_USE_READ_MACROS or
|
corresponding function by defining PNG_USE_READ_MACROS or
|
||||||
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
|
||||||
only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0
|
only supported from 1.5.0; defining PNG_NO_USE_READ_MACROS prior to 1.5.0
|
||||||
will lead to a link failure.
|
will lead to a link failure.
|
||||||
|
|
||||||
Prior to libpng-1.5.4, the zlib compressor used the same set of parameters
|
Prior to libpng-1.5.4, the zlib compressor used the same set of parameters
|
||||||
@@ -4812,7 +4754,10 @@ option was off by default, and slightly inaccurate scaling occurred.
|
|||||||
This option can no longer be turned off, and the choice of accurate
|
This option can no longer be turned off, and the choice of accurate
|
||||||
or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8()
|
or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8()
|
||||||
API for accurate scaling or the old png_set_strip_16_to_8() API for simple
|
API for accurate scaling or the old png_set_strip_16_to_8() API for simple
|
||||||
chopping.
|
chopping. In libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||||
|
macro became PNG_READ_SCALE_16_TO_8_SUPPORTED, and the PNG_READ_16_TO_8
|
||||||
|
macro became PNG_READ_STRIP_16_TO_8_SUPPORTED, to enable the two
|
||||||
|
png_set_*_16_to_8() functions separately.
|
||||||
|
|
||||||
Prior to libpng-1.5.4, the png_set_user_limits() function could only be
|
Prior to libpng-1.5.4, the png_set_user_limits() function could only be
|
||||||
used to reduce the width and height limits from the value of
|
used to reduce the width and height limits from the value of
|
||||||
@@ -4834,25 +4779,8 @@ limits are now
|
|||||||
png_user_chunk_cache_max 0 (unlimited) 128
|
png_user_chunk_cache_max 0 (unlimited) 128
|
||||||
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
|
||||||
|
|
||||||
B. Changes to the build and configuration of libpng
|
The png_set_option() function (and the "options" member of the png struct) was
|
||||||
|
added to libpng-1.5.15.
|
||||||
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
|
|
||||||
majority of library users or builders; however, the few who configure libpng
|
|
||||||
to a non-default feature set may need to change how this is done.
|
|
||||||
|
|
||||||
There should be no need for library builders to alter build scripts if
|
|
||||||
these use the distributed build support - configure or the makefiles -
|
|
||||||
however, users of the makefiles may care to update their build scripts
|
|
||||||
to build pnglibconf.h where the corresponding makefile does not do so.
|
|
||||||
|
|
||||||
Building libpng with a non-default configuration has changed completely.
|
|
||||||
The old method using pngusr.h should still work correctly even though the
|
|
||||||
way pngusr.h is used in the build has been changed; however, library
|
|
||||||
builders will probably want to examine the changes to take advantage of
|
|
||||||
new capabilities and to simplify their build system.
|
|
||||||
|
|
||||||
B.1 Specific changes to library configuration capabilities
|
|
||||||
|
|
||||||
The library now supports a complete fixed point implementation and can
|
The library now supports a complete fixed point implementation and can
|
||||||
thus be used on systems that have no floating point support or very
|
thus be used on systems that have no floating point support or very
|
||||||
@@ -4864,27 +4792,7 @@ independent of the choice of fixed versus floating point APIs and all the
|
|||||||
missing fixed point APIs have been implemented.
|
missing fixed point APIs have been implemented.
|
||||||
|
|
||||||
The exact mechanism used to control attributes of API functions has
|
The exact mechanism used to control attributes of API functions has
|
||||||
changed. A single set of operating system independent macro definitions
|
changed, as described in the INSTALL file.
|
||||||
is used and operating system specific directives are defined in
|
|
||||||
pnglibconf.h
|
|
||||||
|
|
||||||
As part of this the mechanism used to choose procedure call standards on
|
|
||||||
those systems that allow a choice has been changed. At present this only
|
|
||||||
affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
|
|
||||||
running on Intel processors. As before, PNGAPI is defined where required
|
|
||||||
to control the exported API functions; however, two new macros, PNGCBAPI
|
|
||||||
and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
|
|
||||||
(PNGCAPI) for functions that must match a C library prototype (currently
|
|
||||||
only png_longjmp_ptr, which must match the C longjmp function.) The new
|
|
||||||
approach is documented in pngconf.h
|
|
||||||
|
|
||||||
Despite these changes, libpng 1.5.0 only supports the native C function
|
|
||||||
calling standard on those platforms tested so far (__cdecl on Microsoft
|
|
||||||
Windows). This is because the support requirements for alternative
|
|
||||||
calling conventions seem to no longer exist. Developers who find it
|
|
||||||
necessary to set PNG_API_RULE to 1 should advise the mailing list
|
|
||||||
(png-mng-implement) of this and library builders who use Openwatcom and
|
|
||||||
therefore set PNG_API_RULE to 2 should also contact the mailing list.
|
|
||||||
|
|
||||||
A new test program, pngvalid, is provided in addition to pngtest.
|
A new test program, pngvalid, is provided in addition to pngtest.
|
||||||
pngvalid validates the arithmetic accuracy of the gamma correction
|
pngvalid validates the arithmetic accuracy of the gamma correction
|
||||||
@@ -4960,46 +4868,6 @@ even though the default is to use the macros - this allows applications
|
|||||||
to choose at app buildtime whether or not to use macros (previously
|
to choose at app buildtime whether or not to use macros (previously
|
||||||
impossible because the functions weren't in the default build.)
|
impossible because the functions weren't in the default build.)
|
||||||
|
|
||||||
B.2 Changes to the configuration mechanism
|
|
||||||
|
|
||||||
Prior to libpng-1.5.0 library builders who needed to configure libpng
|
|
||||||
had either to modify the exported pngconf.h header file to add system
|
|
||||||
specific configuration or had to write feature selection macros into
|
|
||||||
pngusr.h and cause this to be included into pngconf.h by defining
|
|
||||||
PNG_USER_CONFIG. The latter mechanism had the disadvantage that an
|
|
||||||
application built without PNG_USER_CONFIG defined would see the
|
|
||||||
unmodified, default, libpng API and thus would probably fail to link.
|
|
||||||
|
|
||||||
These mechanisms still work in the configure build and in any makefile
|
|
||||||
build that builds pnglibconf.h, although the feature selection macros
|
|
||||||
have changed somewhat as described above. In 1.5.0, however, pngusr.h is
|
|
||||||
processed only once, when the exported header file pnglibconf.h is built.
|
|
||||||
pngconf.h no longer includes pngusr.h, therefore pngusr.h is ignored after the
|
|
||||||
build of pnglibconf.h and it is never included in an application build.
|
|
||||||
|
|
||||||
The rarely used alternative of adding a list of feature macros to the
|
|
||||||
CFLAGS setting in the build also still works; however, the macros will be
|
|
||||||
copied to pnglibconf.h and this may produce macro redefinition warnings
|
|
||||||
when the individual C files are compiled.
|
|
||||||
|
|
||||||
All configuration now only works if pnglibconf.h is built from
|
|
||||||
scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan
|
|
||||||
(the original author of awk) maintains C source code of that awk and this
|
|
||||||
and all known later implementations (often called by subtly different
|
|
||||||
names - nawk and gawk for example) are adequate to build pnglibconf.h.
|
|
||||||
The Sun Microsystems (now Oracle) program 'awk' is an earlier version
|
|
||||||
and does not work; this may also apply to other systems that have a
|
|
||||||
functioning awk called 'nawk'.
|
|
||||||
|
|
||||||
Configuration options are now documented in scripts/pnglibconf.dfa. This
|
|
||||||
file also includes dependency information that ensures a configuration is
|
|
||||||
consistent; that is, if a feature is switched off dependent features are
|
|
||||||
also removed. As a recommended alternative to using feature macros in
|
|
||||||
pngusr.h a system builder may also define equivalent options in pngusr.dfa
|
|
||||||
(or, indeed, any file) and add that to the configuration by setting
|
|
||||||
DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate
|
|
||||||
how to do this, and a case where pngusr.h is still required.
|
|
||||||
|
|
||||||
.SH XI. Detecting libpng
|
.SH XI. Detecting libpng
|
||||||
|
|
||||||
The png_get_io_ptr() function has been present since libpng-0.88, has never
|
The png_get_io_ptr() function has been present since libpng-0.88, has never
|
||||||
@@ -5035,7 +4903,8 @@ mailing list, or directly to glennrp.
|
|||||||
|
|
||||||
.SH XIII. Coding style
|
.SH XIII. Coding style
|
||||||
|
|
||||||
Our coding style is similar to the "Allman" style, with curly
|
Our coding style is similar to the "Allman" style
|
||||||
|
(See http://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
|
||||||
braces on separate lines:
|
braces on separate lines:
|
||||||
|
|
||||||
if (condition)
|
if (condition)
|
||||||
@@ -5130,7 +4999,7 @@ C binary operator and after "for" or "while", and before
|
|||||||
being cast, nor do we put one between a function name and the
|
being cast, nor do we put one between a function name and the
|
||||||
left parenthesis that follows it:
|
left parenthesis that follows it:
|
||||||
|
|
||||||
for (i = 2; i > 0; --i)
|
for (i = 2; i > 0; \-\-i)
|
||||||
y[i] = a(x) + (int)b;
|
y[i] = a(x) + (int)b;
|
||||||
|
|
||||||
We prefer #ifdef and #ifndef to #if defined() and #if !defined()
|
We prefer #ifdef and #ifndef to #if defined() and #if !defined()
|
||||||
@@ -5140,6 +5009,12 @@ with "defined".
|
|||||||
We prefer to express integers that are used as bit masks in hex format,
|
We prefer to express integers that are used as bit masks in hex format,
|
||||||
with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100).
|
with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100).
|
||||||
|
|
||||||
|
We prefer to use underscores in variable names rather than camelCase, except
|
||||||
|
for a few type names that we inherit from zlib.h.
|
||||||
|
|
||||||
|
We prefer "if (something != 0)" and "if (something == 0)"
|
||||||
|
over "if (something)" and if "(!something)", respectively.
|
||||||
|
|
||||||
We do not use the TAB character for indentation in the C sources.
|
We do not use the TAB character for indentation in the C sources.
|
||||||
|
|
||||||
Lines do not exceed 80 characters.
|
Lines do not exceed 80 characters.
|
||||||
@@ -5148,13 +5023,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XIV. Y2K Compliance in libpng
|
.SH XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
May 23, 2013
|
December 22, 2014
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.5.16 are Y2K compliant. It is my belief that earlier
|
upward through 1.5.21 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has two year fields. One is a 2-byte unsigned integer that
|
Libpng only has two year fields. One is a 2-byte unsigned integer that
|
||||||
@@ -5383,6 +5258,21 @@ the first widely used release:
|
|||||||
1.5.16beta01-06 15 10516 15.so.15.16[.0]
|
1.5.16beta01-06 15 10516 15.so.15.16[.0]
|
||||||
1.5.16rc01 15 10516 15.so.15.16[.0]
|
1.5.16rc01 15 10516 15.so.15.16[.0]
|
||||||
1.5.16 15 10516 15.so.15.16[.0]
|
1.5.16 15 10516 15.so.15.16[.0]
|
||||||
|
1.5.17beta01 15 10517 15.so.15.17[.0]
|
||||||
|
1.5.17rc01-03 15 10517 15.so.15.17[.0]
|
||||||
|
1.5.17 15 10517 15.so.15.17[.0]
|
||||||
|
1.5.18beta01-05 15 10518 15.so.15.18[.0]
|
||||||
|
1.5.18rc01-02 15 10518 15.so.15.18[.0]
|
||||||
|
1.5.18 15 10518 15.so.15.18[.0]
|
||||||
|
1.5.19beta01-05 15 10519 15.so.15.19[.0]
|
||||||
|
1.5.19rc01 15 10519 15.so.15.19[.0]
|
||||||
|
1.5.19 15 10519 15.so.15.19[.0]
|
||||||
|
1.5.20beta01-02 15 10520 15.so.15.20[.0]
|
||||||
|
1.5.20rc01-03 15 10520 15.so.15.20[.0]
|
||||||
|
1.5.20 15 10520 15.so.15.20[.0]
|
||||||
|
1.5.21beta01-02 15 10521 15.so.15.21[.0]
|
||||||
|
1.5.21rc01-03 15 10521 15.so.15.21[.0]
|
||||||
|
1.5.21 15 10521 15.so.15.21[.0]
|
||||||
|
|
||||||
Henceforth the source version will match the shared-library minor
|
Henceforth the source version will match the shared-library minor
|
||||||
and patch numbers; the shared-library major version number will be
|
and patch numbers; the shared-library major version number will be
|
||||||
@@ -5439,7 +5329,7 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.5.16 - May 23, 2013:
|
Libpng version 1.5.21 - December 22, 2014:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||||
|
|
||||||
@@ -5462,8 +5352,8 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.5.16, May 23, 2013, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.21, December 22, 2014, are
|
||||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004,2006-20014 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
|
|
||||||
@@ -5561,7 +5451,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
May 23, 2013
|
December 22, 2014
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNGPF 3 "May 23, 2013"
|
.TH LIBPNGPF 3 "December 22, 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.16
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.21
|
||||||
(private functions)
|
(private functions)
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB#include \fI"pngpriv.h"
|
\fB#include \fI"pngpriv.h"
|
||||||
|
|||||||
6
missing
6
missing
@@ -1,9 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Common wrapper for a few potentially missing GNU programs.
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
scriptversion=2012-06-26.16; # UTC
|
scriptversion=2013-10-28.13; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@@ -160,7 +160,7 @@ give_advice ()
|
|||||||
;;
|
;;
|
||||||
autom4te*)
|
autom4te*)
|
||||||
echo "You might have modified some maintainer files that require"
|
echo "You might have modified some maintainer files that require"
|
||||||
echo "the 'automa4te' program to be rebuilt."
|
echo "the 'autom4te' program to be rebuilt."
|
||||||
program_details 'autom4te'
|
program_details 'autom4te'
|
||||||
;;
|
;;
|
||||||
bison*|yacc*)
|
bison*|yacc*)
|
||||||
|
|||||||
2
png.5
2
png.5
@@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "May 23, 2013"
|
.TH PNG 5 "December 22, 2014"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|||||||
174
png.c
174
png.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.15 [March 28, 2013]
|
* Last changed in libpng 1.5.21 [December 22, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_5_16 Your_png_h_is_not_version_1_5_16;
|
typedef png_libpng_version_1_5_21 Your_png_h_is_not_version_1_5_21;
|
||||||
|
|
||||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||||
* of the PNG file signature. If the PNG data is embedded into another
|
* of the PNG file signature. If the PNG data is embedded into another
|
||||||
@@ -174,49 +174,51 @@ png_calculate_crc(png_structp png_ptr, png_const_bytep ptr, png_size_t length)
|
|||||||
int
|
int
|
||||||
png_user_version_check(png_structp png_ptr, png_const_charp user_png_ver)
|
png_user_version_check(png_structp png_ptr, png_const_charp user_png_ver)
|
||||||
{
|
{
|
||||||
if (user_png_ver)
|
/* Libpng versions 1.0.0 and later are binary compatible if the version
|
||||||
|
* string matches through the second '.'; we must recompile any
|
||||||
|
* applications that use any older library version.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (user_png_ver != NULL)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = -1;
|
||||||
|
int found_dots = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (user_png_ver[i] != png_libpng_ver[i])
|
i++;
|
||||||
|
if (user_png_ver[i] != PNG_LIBPNG_VER_STRING[i])
|
||||||
png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
|
png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
|
||||||
} while (png_libpng_ver[i++]);
|
if (user_png_ver[i] == '.')
|
||||||
|
found_dots++;
|
||||||
|
} while (found_dots < 2 && user_png_ver[i] != 0 &&
|
||||||
|
PNG_LIBPNG_VER_STRING[i] != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
|
png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
|
||||||
|
|
||||||
if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
|
if ((png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) != 0)
|
||||||
{
|
{
|
||||||
/* Libpng 0.90 and later are binary incompatible with libpng 0.89, so
|
|
||||||
* we must recompile any applications that use any older library version.
|
|
||||||
* For versions after libpng 1.0, we will be compatible, so we need
|
|
||||||
* only check the first digit.
|
|
||||||
*/
|
|
||||||
if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||
|
|
||||||
(user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
|
|
||||||
(user_png_ver[0] == '0' && user_png_ver[2] < '9'))
|
|
||||||
{
|
|
||||||
#ifdef PNG_WARNINGS_SUPPORTED
|
#ifdef PNG_WARNINGS_SUPPORTED
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
char m[128];
|
char m[128];
|
||||||
|
|
||||||
pos = png_safecat(m, sizeof m, pos, "Application built with libpng-");
|
pos = png_safecat(m, (sizeof m), pos,
|
||||||
pos = png_safecat(m, sizeof m, pos, user_png_ver);
|
"Application built with libpng-");
|
||||||
pos = png_safecat(m, sizeof m, pos, " but running with ");
|
pos = png_safecat(m, (sizeof m), pos, user_png_ver);
|
||||||
pos = png_safecat(m, sizeof m, pos, png_libpng_ver);
|
pos = png_safecat(m, (sizeof m), pos, " but running with ");
|
||||||
|
pos = png_safecat(m, (sizeof m), pos, PNG_LIBPNG_VER_STRING);
|
||||||
|
PNG_UNUSED(pos)
|
||||||
|
|
||||||
png_warning(png_ptr, m);
|
png_warning(png_ptr, m);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
|
||||||
png_ptr->flags = 0;
|
png_ptr->flags = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Success return. */
|
/* Success return. */
|
||||||
@@ -658,14 +660,14 @@ png_get_copyright(png_const_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.5.16 - May 23, 2013" PNG_STRING_NEWLINE \
|
"libpng version 1.5.21 - December 22, 2014" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2013 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.5.16 - May 23, 2013\
|
return "libpng version 1.5.21 - December 22, 2014\
|
||||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2014 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||||
# endif
|
# endif
|
||||||
@@ -1168,6 +1170,17 @@ int png_XYZ_from_xy_checked(png_structp png_ptr, png_XYZ *XYZ, png_xy xy)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
/* This exists solely to work round a warning from GNU C. */
|
||||||
|
static int /* PRIVATE */
|
||||||
|
png_gt(size_t a, size_t b)
|
||||||
|
{
|
||||||
|
return a > b;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
# define png_gt(a,b) ((a) > (b))
|
||||||
|
#endif
|
||||||
|
|
||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_check_IHDR(png_structp png_ptr,
|
png_check_IHDR(png_structp png_ptr,
|
||||||
png_uint_32 width, png_uint_32 height, int bit_depth,
|
png_uint_32 width, png_uint_32 height, int bit_depth,
|
||||||
@@ -1182,53 +1195,68 @@ png_check_IHDR(png_structp png_ptr,
|
|||||||
png_warning(png_ptr, "Image width is zero in IHDR");
|
png_warning(png_ptr, "Image width is zero in IHDR");
|
||||||
error = 1;
|
error = 1;
|
||||||
}
|
}
|
||||||
|
else if (width > PNG_UINT_31_MAX)
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "Invalid image width in IHDR");
|
||||||
|
error = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (png_gt(width,
|
||||||
|
(PNG_SIZE_MAX >> 3) /* 8-byte RGBA pixels */
|
||||||
|
- 48 /* big_row_buf hack */
|
||||||
|
- 1 /* filter byte */
|
||||||
|
- 7*8 /* rounding width to multiple of 8 pix */
|
||||||
|
- 8)) /* extra max_pixel_depth pad */
|
||||||
|
{
|
||||||
|
/* The size of the row must be within the limits of this architecture.
|
||||||
|
* Because the read code can perform arbitrary transformations the
|
||||||
|
* maximum size is checked here. Because the code in png_read_start_row
|
||||||
|
* adds extra space "for safety's sake" in several places a conservative
|
||||||
|
* limit is used here.
|
||||||
|
*
|
||||||
|
* NOTE: it would be far better to check the size that is actually used,
|
||||||
|
* but the effect in the real world is minor and the changes are more
|
||||||
|
* extensive, therefore much more dangerous and much more difficult to
|
||||||
|
* write in a way that avoids compiler warnings.
|
||||||
|
*/
|
||||||
|
png_warning(png_ptr, "Image width is too large for this architecture");
|
||||||
|
error = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||||
|
if (width > png_ptr->user_width_max)
|
||||||
|
# else
|
||||||
|
if (width > PNG_USER_WIDTH_MAX)
|
||||||
|
# endif
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "Image width exceeds user limit in IHDR");
|
||||||
|
error = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (height == 0)
|
if (height == 0)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Image height is zero in IHDR");
|
png_warning(png_ptr, "Image height is zero in IHDR");
|
||||||
error = 1;
|
error = 1;
|
||||||
}
|
}
|
||||||
|
else if (height > PNG_UINT_31_MAX)
|
||||||
# ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
|
||||||
if (width > png_ptr->user_width_max)
|
|
||||||
|
|
||||||
# else
|
|
||||||
if (width > PNG_USER_WIDTH_MAX)
|
|
||||||
# endif
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "Image width exceeds user limit in IHDR");
|
|
||||||
error = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
|
||||||
if (height > png_ptr->user_height_max)
|
|
||||||
# else
|
|
||||||
if (height > PNG_USER_HEIGHT_MAX)
|
|
||||||
# endif
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "Image height exceeds user limit in IHDR");
|
|
||||||
error = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (width > PNG_UINT_31_MAX)
|
|
||||||
{
|
|
||||||
png_warning(png_ptr, "Invalid image width in IHDR");
|
|
||||||
error = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (height > PNG_UINT_31_MAX)
|
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Invalid image height in IHDR");
|
png_warning(png_ptr, "Invalid image height in IHDR");
|
||||||
error = 1;
|
error = 1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (width > (PNG_UINT_32_MAX
|
{
|
||||||
>> 3) /* 8-byte RGBA pixels */
|
# ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||||
- 48 /* bigrowbuf hack */
|
if (height > png_ptr->user_height_max)
|
||||||
- 1 /* filter byte */
|
# else
|
||||||
- 7*8 /* rounding of width to multiple of 8 pixels */
|
if (height > PNG_USER_HEIGHT_MAX)
|
||||||
- 8) /* extra max_pixel_depth pad */
|
# endif
|
||||||
png_warning(png_ptr, "Width is too large for libpng to process pixels");
|
{
|
||||||
|
png_warning(png_ptr, "Image height exceeds user limit in IHDR");
|
||||||
|
error = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Check other values */
|
/* Check other values */
|
||||||
if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&
|
if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&
|
||||||
@@ -1493,7 +1521,7 @@ png_pow10(int power)
|
|||||||
}
|
}
|
||||||
while (power > 0);
|
while (power > 0);
|
||||||
|
|
||||||
if (recip) d = 1/d;
|
if (recip != 0) d = 1/d;
|
||||||
}
|
}
|
||||||
/* else power is 0 and d is 1 */
|
/* else power is 0 and d is 1 */
|
||||||
|
|
||||||
@@ -2011,7 +2039,7 @@ png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times,
|
|||||||
if (s00 >= (D >> 1))
|
if (s00 >= (D >> 1))
|
||||||
++result;
|
++result;
|
||||||
|
|
||||||
if (negative)
|
if (negative != 0)
|
||||||
result = -result;
|
result = -result;
|
||||||
|
|
||||||
/* Check for overflow. */
|
/* Check for overflow. */
|
||||||
@@ -2529,6 +2557,7 @@ png_gamma_significant(png_fixed_point gamma_val)
|
|||||||
gamma_val > PNG_FP_1 + PNG_GAMMA_THRESHOLD_FIXED;
|
gamma_val > PNG_FP_1 + PNG_GAMMA_THRESHOLD_FIXED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_16BIT_SUPPORTED
|
||||||
/* Internal function to build a single 16-bit table - the table consists of
|
/* Internal function to build a single 16-bit table - the table consists of
|
||||||
* 'num' 256-entry subtables, where 'num' is determined by 'shift' - the amount
|
* 'num' 256-entry subtables, where 'num' is determined by 'shift' - the amount
|
||||||
* to shift the input values right (or 16-number_of_signifiant_bits).
|
* to shift the input values right (or 16-number_of_signifiant_bits).
|
||||||
@@ -2577,7 +2606,7 @@ png_build_16bit_table(png_structp png_ptr, png_uint_16pp *ptable,
|
|||||||
double d = floor(65535*pow(ig/(double)max, gamma_val*.00001)+.5);
|
double d = floor(65535*pow(ig/(double)max, gamma_val*.00001)+.5);
|
||||||
sub_table[j] = (png_uint_16)d;
|
sub_table[j] = (png_uint_16)d;
|
||||||
# else
|
# else
|
||||||
if (shift)
|
if (shift != 0)
|
||||||
ig = (ig * 65535U + max_by_2)/max;
|
ig = (ig * 65535U + max_by_2)/max;
|
||||||
|
|
||||||
sub_table[j] = png_gamma_16bit_correct(ig, gamma_val);
|
sub_table[j] = png_gamma_16bit_correct(ig, gamma_val);
|
||||||
@@ -2593,7 +2622,7 @@ png_build_16bit_table(png_structp png_ptr, png_uint_16pp *ptable,
|
|||||||
{
|
{
|
||||||
png_uint_32 ig = (j << (8-shift)) + i;
|
png_uint_32 ig = (j << (8-shift)) + i;
|
||||||
|
|
||||||
if (shift)
|
if (shift != 0)
|
||||||
ig = (ig * 65535U + max_by_2)/max;
|
ig = (ig * 65535U + max_by_2)/max;
|
||||||
|
|
||||||
sub_table[j] = (png_uint_16)ig;
|
sub_table[j] = (png_uint_16)ig;
|
||||||
@@ -2601,6 +2630,7 @@ png_build_16bit_table(png_structp png_ptr, png_uint_16pp *ptable,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* NOTE: this function expects the *inverse* of the overall gamma transformation
|
/* NOTE: this function expects the *inverse* of the overall gamma transformation
|
||||||
* required.
|
* required.
|
||||||
|
|||||||
48
png.h
48
png.h
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.5.16 - May 23, 2013
|
* libpng version 1.5.21 - December 22, 2014
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.5.16 - May 23, 2013: Glenn
|
* libpng versions 0.97, January 1998, through 1.5.21 - December 22, 2014: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@@ -190,6 +190,21 @@
|
|||||||
* 1.5.16beta01-06 15 10516 15.so.15.16[.0]
|
* 1.5.16beta01-06 15 10516 15.so.15.16[.0]
|
||||||
* 1.5.16rc01 15 10516 15.so.15.16[.0]
|
* 1.5.16rc01 15 10516 15.so.15.16[.0]
|
||||||
* 1.5.16 15 10516 15.so.15.16[.0]
|
* 1.5.16 15 10516 15.so.15.16[.0]
|
||||||
|
* 1.5.17beta01 15 10517 15.so.15.17[.0]
|
||||||
|
* 1.5.17rc01-03 15 10517 15.so.15.17[.0]
|
||||||
|
* 1.5.17 15 10517 15.so.15.17[.0]
|
||||||
|
* 1.5.18beta01-05 15 10518 15.so.15.18[.0]
|
||||||
|
* 1.5.18rc01-02 15 10518 15.so.15.18[.0]
|
||||||
|
* 1.5.18 15 10518 15.so.15.18[.0]
|
||||||
|
* 1.5.19beta01-05 15 10519 15.so.15.19[.0]
|
||||||
|
* 1.5.19rc01 15 10519 15.so.15.19[.0]
|
||||||
|
* 1.5.19 15 10519 15.so.15.19[.0]
|
||||||
|
* 1.5.20beta01-02 15 10520 15.so.15.20[.0]
|
||||||
|
* 1.5.20rc01-03 15 10520 15.so.15.20[.0]
|
||||||
|
* 1.5.20 15 10520 15.so.15.20[.0]
|
||||||
|
* 1.5.21beta01-02 15 10521 15.so.15.21[.0]
|
||||||
|
* 1.5.21rc01-03 15 10521 15.so.15.21[.0]
|
||||||
|
* 1.5.21 15 10521 15.so.15.21[.0]
|
||||||
*
|
*
|
||||||
* Henceforth the source version will match the shared-library major
|
* Henceforth the source version will match the shared-library major
|
||||||
* and minor numbers; the shared-library major version number will be
|
* and minor numbers; the shared-library major version number will be
|
||||||
@@ -221,8 +236,8 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.16, May 23, 2013, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.5.21, December 22, 2014, are
|
||||||
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
*
|
*
|
||||||
@@ -333,13 +348,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* May 23, 2013
|
* December 22, 2014
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
*
|
*
|
||||||
* This is your unofficial assurance that libpng from version 0.71 and
|
* This is your unofficial assurance that libpng from version 0.71 and
|
||||||
* upward through 1.5.16 are Y2K compliant. It is my belief that
|
* upward through 1.5.21 are Y2K compliant. It is my belief that
|
||||||
* earlier versions were also Y2K compliant.
|
* earlier versions were also Y2K compliant.
|
||||||
*
|
*
|
||||||
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||||
@@ -391,16 +406,18 @@
|
|||||||
/* This is not the place to learn how to use libpng. The file libpng-manual.txt
|
/* This is not the place to learn how to use libpng. The file libpng-manual.txt
|
||||||
* describes how to use libpng, and the file example.c summarizes it
|
* describes how to use libpng, and the file example.c summarizes it
|
||||||
* with some code on which to build. This file is useful for looking
|
* with some code on which to build. This file is useful for looking
|
||||||
* at the actual function definitions and structure components.
|
* at the actual function definitions and structure components. If that
|
||||||
|
* file has been stripped from your copy of libpng, you can find it at
|
||||||
|
* <http://www.libpng.org/pub/png/libpng-manual.txt>
|
||||||
*
|
*
|
||||||
* If you just need to read a PNG file and don't want to read the documentation
|
* If you just need to read a PNG file and don't want to read the documentation
|
||||||
* skip to the end of this file and read the section entitled 'simplified API'.
|
* skip to the end of this file and read the section entitled 'simplified API'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.5.16"
|
#define PNG_LIBPNG_VER_STRING "1.5.21"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.5.16 - May 23, 2013\n"
|
" libpng version 1.5.21 - December 22, 2014\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 15
|
#define PNG_LIBPNG_VER_SONUM 15
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||||
@@ -408,7 +425,7 @@
|
|||||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||||
#define PNG_LIBPNG_VER_MAJOR 1
|
#define PNG_LIBPNG_VER_MAJOR 1
|
||||||
#define PNG_LIBPNG_VER_MINOR 5
|
#define PNG_LIBPNG_VER_MINOR 5
|
||||||
#define PNG_LIBPNG_VER_RELEASE 16
|
#define PNG_LIBPNG_VER_RELEASE 21
|
||||||
|
|
||||||
/* This should match the numeric part of the final component of
|
/* This should match the numeric part of the final component of
|
||||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
||||||
@@ -439,7 +456,7 @@
|
|||||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
||||||
*/
|
*/
|
||||||
#define PNG_LIBPNG_VER 10516 /* 1.5.16 */
|
#define PNG_LIBPNG_VER 10521 /* 1.5.21 */
|
||||||
|
|
||||||
/* Library configuration: these options cannot be changed after
|
/* Library configuration: these options cannot be changed after
|
||||||
* the library has been built.
|
* the library has been built.
|
||||||
@@ -561,7 +578,7 @@ extern "C" {
|
|||||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||||
* do not agree upon the version number.
|
* do not agree upon the version number.
|
||||||
*/
|
*/
|
||||||
typedef char* png_libpng_version_1_5_16;
|
typedef char* png_libpng_version_1_5_21;
|
||||||
|
|
||||||
/* Three color definitions. The order of the red, green, and blue, (and the
|
/* Three color definitions. The order of the red, green, and blue, (and the
|
||||||
* exact size) is not important, although the size of the fields need to
|
* exact size) is not important, although the size of the fields need to
|
||||||
@@ -1952,6 +1969,8 @@ PNG_EXPORTA(103, void, png_chunk_error, (png_structp png_ptr,
|
|||||||
#else
|
#else
|
||||||
/* Fatal error in PNG image of libpng - can't continue */
|
/* Fatal error in PNG image of libpng - can't continue */
|
||||||
PNG_EXPORTA(104, void, png_err, (png_structp png_ptr), PNG_NORETURN);
|
PNG_EXPORTA(104, void, png_err, (png_structp png_ptr), PNG_NORETURN);
|
||||||
|
# define png_error(s1,s2) png_err(s1)
|
||||||
|
# define png_chunk_error(s1,s2) png_err(s1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_WARNINGS_SUPPORTED
|
#ifdef PNG_WARNINGS_SUPPORTED
|
||||||
@@ -1962,6 +1981,9 @@ PNG_EXPORT(105, void, png_warning, (png_structp png_ptr,
|
|||||||
/* Non-fatal error in libpng, chunk name is prepended to message. */
|
/* Non-fatal error in libpng, chunk name is prepended to message. */
|
||||||
PNG_EXPORT(106, void, png_chunk_warning, (png_structp png_ptr,
|
PNG_EXPORT(106, void, png_chunk_warning, (png_structp png_ptr,
|
||||||
png_const_charp warning_message));
|
png_const_charp warning_message));
|
||||||
|
#else
|
||||||
|
# define png_warning(s1,s2) ((void)(s1))
|
||||||
|
# define png_chunk_warning(s1,s2) ((void)(s1))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
|
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.5.16 - May 23, 2013
|
* libpng version 1.5.21 - December 22, 2014
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@@ -338,6 +338,7 @@
|
|||||||
* functions in png.h will generate compiler warnings. Added at libpng
|
* functions in png.h will generate compiler warnings. Added at libpng
|
||||||
* version 1.2.41.
|
* version 1.2.41.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__)
|
||||||
# ifndef PNG_USE_RESULT
|
# ifndef PNG_USE_RESULT
|
||||||
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
|
||||||
@@ -361,7 +362,7 @@
|
|||||||
__attribute__((__deprecated__))
|
__attribute__((__deprecated__))
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif /* __GNUC__ >= 3 */
|
# endif /* __GNUC__ >= 3 */
|
||||||
# endif /* __GNUC__ */
|
# endif /* __GNUC__ */
|
||||||
|
|
||||||
# if defined(_MSC_VER) && (_MSC_VER >= 1300)
|
# if defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||||
|
|||||||
21
pngdebug.h
21
pngdebug.h
@@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c
|
/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.0 [January 6, 2011]
|
* Last changed in libpng 1.5.18 [February 6, 2014]
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
* (actually ((void)0)).
|
* (actually ((void)0)).
|
||||||
*
|
*
|
||||||
* level: level of detail of message, starting at 0. A level 'n'
|
* level: level of detail of message, starting at 0. A level 'n'
|
||||||
* message is preceded by 'n' tab characters (not implemented
|
* message is preceded by 'n' 3-space indentations (not implemented
|
||||||
* on Microsoft compilers unless PNG_DEBUG_FILE is also
|
* on Microsoft compilers unless PNG_DEBUG_FILE is also
|
||||||
* defined, to allow debug DLL compilation with no standard IO).
|
* defined, to allow debug DLL compilation with no standard IO).
|
||||||
* message: a printf(3) style text string. A trailing '\n' is added
|
* message: a printf(3) style text string. A trailing '\n' is added
|
||||||
@@ -77,32 +77,29 @@
|
|||||||
# endif /* PNG_DEBUG_FILE */
|
# endif /* PNG_DEBUG_FILE */
|
||||||
|
|
||||||
# if (PNG_DEBUG > 1)
|
# if (PNG_DEBUG > 1)
|
||||||
/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on
|
|
||||||
* non-ISO compilers
|
|
||||||
*/
|
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
# ifndef png_debug
|
# ifndef png_debug
|
||||||
# define png_debug(l,m) \
|
# define png_debug(l,m) \
|
||||||
do { \
|
do { \
|
||||||
int num_tabs=l; \
|
int num_tabs=l; \
|
||||||
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? " " : \
|
||||||
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
|
(num_tabs==2 ? " " : (num_tabs>2 ? " " : "")))); \
|
||||||
} while (0)
|
} while (0)
|
||||||
# endif
|
# endif
|
||||||
# ifndef png_debug1
|
# ifndef png_debug1
|
||||||
# define png_debug1(l,m,p1) \
|
# define png_debug1(l,m,p1) \
|
||||||
do { \
|
do { \
|
||||||
int num_tabs=l; \
|
int num_tabs=l; \
|
||||||
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? " " : \
|
||||||
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
|
(num_tabs==2 ? " " : (num_tabs>2 ? " " : ""))),p1); \
|
||||||
} while (0)
|
} while (0)
|
||||||
# endif
|
# endif
|
||||||
# ifndef png_debug2
|
# ifndef png_debug2
|
||||||
# define png_debug2(l,m,p1,p2) \
|
# define png_debug2(l,m,p1,p2) \
|
||||||
do { \
|
do { \
|
||||||
int num_tabs=l; \
|
int num_tabs=l; \
|
||||||
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? " " : \
|
||||||
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
|
(num_tabs==2 ? " " : (num_tabs>2 ? " " : ""))),p1,p2);\
|
||||||
} while (0)
|
} while (0)
|
||||||
# endif
|
# endif
|
||||||
# else /* __STDC __ */
|
# else /* __STDC __ */
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngerror.c - stub functions for i/o and memory allocation
|
/* pngerror.c - stub functions for i/o and memory allocation
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.14 [January 24, 2013]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -193,7 +193,7 @@ png_format_number(png_const_charp start, png_charp end, int format,
|
|||||||
* drop the decimal point. If the number is a true zero handle that
|
* drop the decimal point. If the number is a true zero handle that
|
||||||
* here.
|
* here.
|
||||||
*/
|
*/
|
||||||
if (output)
|
if (output != 0)
|
||||||
*--end = '.';
|
*--end = '.';
|
||||||
else if (number == 0) /* and !output */
|
else if (number == 0) /* and !output */
|
||||||
*--end = '0';
|
*--end = '0';
|
||||||
@@ -578,6 +578,9 @@ png_longjmp,(png_structp png_ptr, int val),PNG_NORETURN)
|
|||||||
png_ptr->longjmp_fn(png_ptr->longjmp_buffer, val);
|
png_ptr->longjmp_fn(png_ptr->longjmp_buffer, val);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(png_ptr);
|
||||||
|
PNG_UNUSED(val);
|
||||||
#endif
|
#endif
|
||||||
/* Here if not setjmp support or if png_ptr is null. */
|
/* Here if not setjmp support or if png_ptr is null. */
|
||||||
PNG_ABORT();
|
PNG_ABORT();
|
||||||
|
|||||||
27
pngget.c
27
pngget.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngget.c - retrieval of values from info struct
|
/* pngget.c - retrieval of values from info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.15 [March 28, 2013]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -123,6 +123,9 @@ png_get_x_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
|
|||||||
if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
|
if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
|
||||||
return (info_ptr->x_pixels_per_unit);
|
return (info_ptr->x_pixels_per_unit);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
|
PNG_UNUSED(info_ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@@ -140,6 +143,9 @@ png_get_y_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
|
|||||||
if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
|
if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
|
||||||
return (info_ptr->y_pixels_per_unit);
|
return (info_ptr->y_pixels_per_unit);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
|
PNG_UNUSED(info_ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@@ -157,6 +163,9 @@ png_get_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
|
|||||||
info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit)
|
info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit)
|
||||||
return (info_ptr->x_pixels_per_unit);
|
return (info_ptr->x_pixels_per_unit);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
|
PNG_UNUSED(info_ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@@ -226,6 +235,9 @@ png_get_x_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr)
|
|||||||
if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
|
if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
|
||||||
return (info_ptr->x_offset);
|
return (info_ptr->x_offset);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
|
PNG_UNUSED(info_ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@@ -242,6 +254,9 @@ png_get_y_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr)
|
|||||||
if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
|
if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
|
||||||
return (info_ptr->y_offset);
|
return (info_ptr->y_offset);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
|
PNG_UNUSED(info_ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@@ -258,6 +273,9 @@ png_get_x_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr)
|
|||||||
if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
|
if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
|
||||||
return (info_ptr->x_offset);
|
return (info_ptr->x_offset);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
|
PNG_UNUSED(info_ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@@ -274,6 +292,9 @@ png_get_y_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr)
|
|||||||
if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
|
if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
|
||||||
return (info_ptr->y_offset);
|
return (info_ptr->y_offset);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(png_ptr)
|
||||||
|
PNG_UNUSED(info_ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
@@ -652,7 +673,7 @@ png_get_gAMA(png_const_structp png_ptr, png_const_infop info_ptr,
|
|||||||
png_fixed_point igamma;
|
png_fixed_point igamma;
|
||||||
png_uint_32 ok = png_get_gAMA_fixed(png_ptr, info_ptr, &igamma);
|
png_uint_32 ok = png_get_gAMA_fixed(png_ptr, info_ptr, &igamma);
|
||||||
|
|
||||||
if (ok)
|
if (ok != 0)
|
||||||
*file_gamma = png_float(png_ptr, igamma, "png_get_gAMA");
|
*file_gamma = png_float(png_ptr, igamma, "png_get_gAMA");
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
|
|||||||
16
pngpread.c
16
pngpread.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngpread.c - read a png file in push mode
|
/* pngpread.c - read a png file in push mode
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.11 [June 14, 2012]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -49,7 +49,7 @@ png_process_data_pause(png_structp png_ptr, int save)
|
|||||||
/* It's easiest for the caller if we do the save, then the caller doesn't
|
/* It's easiest for the caller if we do the save, then the caller doesn't
|
||||||
* have to supply the same data again:
|
* have to supply the same data again:
|
||||||
*/
|
*/
|
||||||
if (save)
|
if (save != 0)
|
||||||
png_push_save_buffer(png_ptr);
|
png_push_save_buffer(png_ptr);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -151,7 +151,7 @@ png_process_some_data(png_structp png_ptr, png_infop info_ptr)
|
|||||||
void /* PRIVATE */
|
void /* PRIVATE */
|
||||||
png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
|
png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
|
||||||
{
|
{
|
||||||
png_size_t num_checked = png_ptr->sig_bytes,
|
png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
|
||||||
num_to_check = 8 - num_checked;
|
num_to_check = 8 - num_checked;
|
||||||
|
|
||||||
if (png_ptr->buffer_size < num_to_check)
|
if (png_ptr->buffer_size < num_to_check)
|
||||||
@@ -897,6 +897,12 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
|
|||||||
*/
|
*/
|
||||||
ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);
|
ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);
|
||||||
|
|
||||||
|
/* Hack, added in 1.5.18: the progressive reader does not reset
|
||||||
|
* png_ptr->zstream, so any attempt to use it after the last IDAT fails
|
||||||
|
* (silently). This allows the read code to do the reset when required.
|
||||||
|
*/
|
||||||
|
png_ptr->flags |= PNG_FLAG_ZSTREAM_PROGRESSIVE;
|
||||||
|
|
||||||
/* Check for any failure before proceeding. */
|
/* Check for any failure before proceeding. */
|
||||||
if (ret != Z_OK && ret != Z_STREAM_END)
|
if (ret != Z_OK && ret != Z_STREAM_END)
|
||||||
{
|
{
|
||||||
@@ -1285,7 +1291,7 @@ png_progressive_combine_row (png_structp png_ptr, png_bytep old_row,
|
|||||||
* it must be png_ptr->row_buf+1
|
* it must be png_ptr->row_buf+1
|
||||||
*/
|
*/
|
||||||
if (new_row != NULL)
|
if (new_row != NULL)
|
||||||
png_combine_row(png_ptr, old_row, 1/*display*/);
|
png_combine_row(png_ptr, old_row, 1/*blocky display*/);
|
||||||
}
|
}
|
||||||
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||||
|
|
||||||
|
|||||||
77
pngpriv.h
77
pngpriv.h
@@ -1,13 +1,11 @@
|
|||||||
|
|
||||||
/* pngpriv.h - private declarations for use inside libpng
|
/* pngpriv.h - private declarations for use inside libpng
|
||||||
*
|
*
|
||||||
* For conditions of distribution and use, see copyright notice in png.h
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.15 [March 28, 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
|
||||||
@@ -133,6 +131,53 @@
|
|||||||
# define PNG_DLL_EXPORT
|
# define PNG_DLL_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Compile time options.
|
||||||
|
* =====================
|
||||||
|
* In a multi-arch build the compiler may compile the code several times for the
|
||||||
|
* same object module, producing different binaries for different architectures.
|
||||||
|
* When this happens configure-time setting of the target host options cannot be
|
||||||
|
* done and this interferes with the handling of the ARM NEON optimizations, and
|
||||||
|
* possibly other similar optimizations. Put additional tests here; in general
|
||||||
|
* this is needed when the same option can be changed at both compile time and
|
||||||
|
* run time depending on the target OS (i.e. iOS vs Android.)
|
||||||
|
*
|
||||||
|
* NOTE: symbol prefixing does not pass $(CFLAGS) to the preprocessor, because
|
||||||
|
* this is not possible with certain compilers (Oracle SUN OS CC), as a result
|
||||||
|
* it is necessary to ensure that all extern functions that *might* be used
|
||||||
|
* regardless of $(CFLAGS) get declared in this file. The test on __ARM_NEON__
|
||||||
|
* below is one example of this behavior because it is controlled by the
|
||||||
|
* presence or not of -mfpu=neon on the GCC command line, it is possible to do
|
||||||
|
* this in $(CC), e.g. "CC=gcc -mfpu=neon", but people who build libpng rarely
|
||||||
|
* do this.
|
||||||
|
*/
|
||||||
|
#ifndef PNG_ARM_NEON_OPT
|
||||||
|
/* ARM NEON optimizations are being controlled by the compiler settings,
|
||||||
|
* typically the target FPU. If the FPU has been set to NEON (-mfpu=neon
|
||||||
|
* with GCC) then the compiler will define __ARM_NEON__ and we can rely
|
||||||
|
* unconditionally on NEON instructions not crashing, otherwise we must
|
||||||
|
* disable use of NEON instructions.
|
||||||
|
*
|
||||||
|
* NOTE: at present these optimizations depend on 'ALIGNED_MEMORY', so they
|
||||||
|
* can only be turned on automatically if that is supported too. If
|
||||||
|
* PNG_ARM_NEON_OPT is set in CPPFLAGS (to >0) then arm/arm_init.c will fail
|
||||||
|
* to compile with an appropriate #error if ALIGNED_MEMORY has been turned
|
||||||
|
* off.
|
||||||
|
*/
|
||||||
|
# if defined(__ARM_NEON__) && defined(PNG_ALIGNED_MEMORY_SUPPORTED)
|
||||||
|
# define PNG_ARM_NEON_OPT 2
|
||||||
|
# else
|
||||||
|
# define PNG_ARM_NEON_OPT 0
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if PNG_ARM_NEON_OPT > 0
|
||||||
|
/* NEON optimizations are to be at least considered by libpng, so enable the
|
||||||
|
* callbacks to do this.
|
||||||
|
*/
|
||||||
|
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_neon
|
||||||
|
#endif
|
||||||
|
|
||||||
/* SECURITY and SAFETY:
|
/* SECURITY and SAFETY:
|
||||||
*
|
*
|
||||||
* By default libpng is built without any internal limits on image size,
|
* By default libpng is built without any internal limits on image size,
|
||||||
@@ -252,8 +297,6 @@
|
|||||||
#ifdef PNG_WARNINGS_SUPPORTED
|
#ifdef PNG_WARNINGS_SUPPORTED
|
||||||
# define PNG_WARNING_PARAMETERS(p) png_warning_parameters p;
|
# define PNG_WARNING_PARAMETERS(p) png_warning_parameters p;
|
||||||
#else
|
#else
|
||||||
# define png_warning(s1,s2) ((void)(s1))
|
|
||||||
# define png_chunk_warning(s1,s2) ((void)(s1))
|
|
||||||
# define png_warning_parameter(p,number,string) ((void)0)
|
# define png_warning_parameter(p,number,string) ((void)0)
|
||||||
# define png_warning_parameter_unsigned(p,number,format,value) ((void)0)
|
# define png_warning_parameter_unsigned(p,number,format,value) ((void)0)
|
||||||
# define png_warning_parameter_signed(p,number,format,value) ((void)0)
|
# define png_warning_parameter_signed(p,number,format,value) ((void)0)
|
||||||
@@ -261,8 +304,6 @@
|
|||||||
# define PNG_WARNING_PARAMETERS(p)
|
# define PNG_WARNING_PARAMETERS(p)
|
||||||
#endif
|
#endif
|
||||||
#ifndef PNG_ERROR_TEXT_SUPPORTED
|
#ifndef PNG_ERROR_TEXT_SUPPORTED
|
||||||
# define png_error(s1,s2) png_err(s1)
|
|
||||||
# define png_chunk_error(s1,s2) png_err(s1)
|
|
||||||
# define png_fixed_error(s1,s2) png_err(s1)
|
# define png_fixed_error(s1,s2) png_err(s1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -377,7 +418,7 @@
|
|||||||
# define CVT_PTR_NOCHECK(ptr) (ptr)
|
# define CVT_PTR_NOCHECK(ptr) (ptr)
|
||||||
# define png_strlen lstrlenA
|
# define png_strlen lstrlenA
|
||||||
# define png_memcmp memcmp
|
# define png_memcmp memcmp
|
||||||
# define png_memcpy CopyMemory
|
# define png_memcpy memcpy
|
||||||
# define png_memset memset
|
# define png_memset memset
|
||||||
# else
|
# else
|
||||||
# define CVT_PTR(ptr) (ptr)
|
# define CVT_PTR(ptr) (ptr)
|
||||||
@@ -525,7 +566,7 @@
|
|||||||
#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000
|
#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000
|
||||||
#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000
|
#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000
|
||||||
#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000
|
#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000
|
||||||
/* 0x200000 unused */
|
#define PNG_FLAG_ZSTREAM_PROGRESSIVE 0x200000
|
||||||
/* 0x400000 unused */
|
/* 0x400000 unused */
|
||||||
#define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000 /* Added to libpng-1.4.0 */
|
#define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000 /* Added to libpng-1.4.0 */
|
||||||
#define PNG_FLAG_ZTXT_CUSTOM_STRATEGY 0x1000000 /* 5 lines added */
|
#define PNG_FLAG_ZTXT_CUSTOM_STRATEGY 0x1000000 /* 5 lines added */
|
||||||
@@ -1728,13 +1769,21 @@ PNG_EXTERN void png_set_rgb_to_gray_fixed PNGARG((png_structp png_ptr,
|
|||||||
#endif
|
#endif
|
||||||
#endif /* FIX MISSING !FIXED_POINT DECLARATIONS */
|
#endif /* FIX MISSING !FIXED_POINT DECLARATIONS */
|
||||||
|
|
||||||
|
/* These are initialization functions for hardware specific PNG filter
|
||||||
|
* optimizations; list these here then select the appropriate one at compile
|
||||||
|
* time using the macro PNG_FILTER_OPTIMIZATIONS. If the macro is not defined
|
||||||
|
* the generic code is used.
|
||||||
|
*/
|
||||||
#ifdef PNG_FILTER_OPTIMIZATIONS
|
#ifdef PNG_FILTER_OPTIMIZATIONS
|
||||||
PNG_EXTERN void PNG_FILTER_OPTIMIZATIONS(png_structp png_ptr, unsigned int bpp);
|
PNG_EXTERN void PNG_FILTER_OPTIMIZATIONS(png_structp png_ptr, unsigned int bpp);
|
||||||
/* This is the initialization function for hardware specific optimizations,
|
/* Just declare the optimization that will be used */
|
||||||
* one implementation (for ARM NEON machines) is contained in
|
#else
|
||||||
* arm/filter_neon.c. It need not be defined - the generic code will be used
|
/* List *all* the possible optimizations here - this branch is required if
|
||||||
* if not.
|
* the builder of libpng passes the definition of PNG_FILTER_OPTIMIZATIONS in
|
||||||
|
* CFLAGS in place of CPPFLAGS *and* uses symbol prefixing.
|
||||||
*/
|
*/
|
||||||
|
PNG_EXTERN void png_init_filter_functions_neon(png_structp png_ptr,
|
||||||
|
unsigned int bpp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Maintainer: Put new private prototypes here ^ */
|
/* Maintainer: Put new private prototypes here ^ */
|
||||||
|
|||||||
22
pngread.c
22
pngread.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.14 [January 24, 2013]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -100,7 +100,7 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
if (!png_user_version_check(png_ptr, user_png_ver))
|
if (!png_user_version_check(png_ptr, user_png_ver))
|
||||||
png_cleanup_needed = 1;
|
png_cleanup_needed = 1;
|
||||||
|
|
||||||
if (!png_cleanup_needed)
|
if (png_cleanup_needed == 0)
|
||||||
{
|
{
|
||||||
/* Initialize zbuf - compression buffer */
|
/* Initialize zbuf - compression buffer */
|
||||||
png_ptr->zbuf_size = PNG_ZBUF_SIZE;
|
png_ptr->zbuf_size = PNG_ZBUF_SIZE;
|
||||||
@@ -114,7 +114,7 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
png_ptr->zstream.zfree = png_zfree;
|
png_ptr->zstream.zfree = png_zfree;
|
||||||
png_ptr->zstream.opaque = (voidpf)png_ptr;
|
png_ptr->zstream.opaque = (voidpf)png_ptr;
|
||||||
|
|
||||||
if (!png_cleanup_needed)
|
if (png_cleanup_needed == 0)
|
||||||
{
|
{
|
||||||
switch (inflateInit(&png_ptr->zstream))
|
switch (inflateInit(&png_ptr->zstream))
|
||||||
{
|
{
|
||||||
@@ -141,7 +141,7 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_cleanup_needed)
|
if (png_cleanup_needed != 0)
|
||||||
{
|
{
|
||||||
/* Clean up PNG structure and deallocate any memory. */
|
/* Clean up PNG structure and deallocate any memory. */
|
||||||
png_free(png_ptr, png_ptr->zbuf);
|
png_free(png_ptr, png_ptr->zbuf);
|
||||||
@@ -1191,7 +1191,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
|||||||
if (transforms & PNG_TRANSFORM_EXPAND)
|
if (transforms & PNG_TRANSFORM_EXPAND)
|
||||||
if ((png_ptr->bit_depth < 8) ||
|
if ((png_ptr->bit_depth < 8) ||
|
||||||
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
|
(png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
|
||||||
(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
|
(info_ptr->valid & PNG_INFO_tRNS))
|
||||||
png_set_expand(png_ptr);
|
png_set_expand(png_ptr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1210,14 +1210,8 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
|
|||||||
* [0,65535] to the original [0,7] or [0,31], or whatever range the
|
* [0,65535] to the original [0,7] or [0,31], or whatever range the
|
||||||
* colors were originally in:
|
* colors were originally in:
|
||||||
*/
|
*/
|
||||||
if ((transforms & PNG_TRANSFORM_SHIFT)
|
if ((transforms & PNG_TRANSFORM_SHIFT) && (info_ptr->valid & PNG_INFO_sBIT))
|
||||||
&& png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT))
|
png_set_shift(png_ptr, &info_ptr->sig_bit);
|
||||||
{
|
|
||||||
png_color_8p sig_bit;
|
|
||||||
|
|
||||||
png_get_sBIT(png_ptr, info_ptr, &sig_bit);
|
|
||||||
png_set_shift(png_ptr, sig_bit);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_BGR_SUPPORTED
|
#ifdef PNG_READ_BGR_SUPPORTED
|
||||||
|
|||||||
99
pngrtran.c
99
pngrtran.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.16 [May 23, 2013]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -114,7 +114,7 @@ png_set_background_fixed(png_structp png_ptr,
|
|||||||
png_sizeof(png_color_16));
|
png_sizeof(png_color_16));
|
||||||
png_ptr->background_gamma = background_gamma;
|
png_ptr->background_gamma = background_gamma;
|
||||||
png_ptr->background_gamma_type = (png_byte)(background_gamma_code);
|
png_ptr->background_gamma_type = (png_byte)(background_gamma_code);
|
||||||
if (need_expand)
|
if (need_expand != 0)
|
||||||
png_ptr->transformations |= PNG_BACKGROUND_EXPAND;
|
png_ptr->transformations |= PNG_BACKGROUND_EXPAND;
|
||||||
else
|
else
|
||||||
png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND;
|
png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND;
|
||||||
@@ -197,7 +197,7 @@ translate_gamma_flags(png_structp png_ptr, png_fixed_point output_gamma,
|
|||||||
# else
|
# else
|
||||||
PNG_UNUSED(png_ptr)
|
PNG_UNUSED(png_ptr)
|
||||||
# endif
|
# endif
|
||||||
if (is_screen)
|
if (is_screen != 0)
|
||||||
output_gamma = PNG_GAMMA_sRGB;
|
output_gamma = PNG_GAMMA_sRGB;
|
||||||
else
|
else
|
||||||
output_gamma = PNG_GAMMA_sRGB_INVERSE;
|
output_gamma = PNG_GAMMA_sRGB_INVERSE;
|
||||||
@@ -206,7 +206,7 @@ translate_gamma_flags(png_structp png_ptr, png_fixed_point output_gamma,
|
|||||||
else if (output_gamma == PNG_GAMMA_MAC_18 ||
|
else if (output_gamma == PNG_GAMMA_MAC_18 ||
|
||||||
output_gamma == PNG_FP_1 / PNG_GAMMA_MAC_18)
|
output_gamma == PNG_FP_1 / PNG_GAMMA_MAC_18)
|
||||||
{
|
{
|
||||||
if (is_screen)
|
if (is_screen != 0)
|
||||||
output_gamma = PNG_GAMMA_MAC_OLD;
|
output_gamma = PNG_GAMMA_MAC_OLD;
|
||||||
else
|
else
|
||||||
output_gamma = PNG_GAMMA_MAC_INVERSE;
|
output_gamma = PNG_GAMMA_MAC_INVERSE;
|
||||||
@@ -331,7 +331,7 @@ png_set_alpha_mode_fixed(png_structp png_ptr, int mode,
|
|||||||
/* Finally, if pre-multiplying, set the background fields to achieve the
|
/* Finally, if pre-multiplying, set the background fields to achieve the
|
||||||
* desired result.
|
* desired result.
|
||||||
*/
|
*/
|
||||||
if (compose)
|
if (compose != 0)
|
||||||
{
|
{
|
||||||
/* And obtain alpha pre-multiplication by composing on black: */
|
/* And obtain alpha pre-multiplication by composing on black: */
|
||||||
png_memset(&png_ptr->background, 0, sizeof png_ptr->background);
|
png_memset(&png_ptr->background, 0, sizeof png_ptr->background);
|
||||||
@@ -391,7 +391,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette,
|
|||||||
|
|
||||||
png_ptr->transformations |= PNG_QUANTIZE;
|
png_ptr->transformations |= PNG_QUANTIZE;
|
||||||
|
|
||||||
if (!full_quantize)
|
if (full_quantize == 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -446,12 +446,12 @@ png_set_quantize(png_structp png_ptr, png_colorp palette,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (done)
|
if (done != 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Swap the palette around, and set up a table, if necessary */
|
/* Swap the palette around, and set up a table, if necessary */
|
||||||
if (full_quantize)
|
if (full_quantize != 0)
|
||||||
{
|
{
|
||||||
int j = num_palette;
|
int j = num_palette;
|
||||||
|
|
||||||
@@ -634,7 +634,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette,
|
|||||||
num_new_palette--;
|
num_new_palette--;
|
||||||
palette[png_ptr->index_to_palette[j]]
|
palette[png_ptr->index_to_palette[j]]
|
||||||
= palette[num_new_palette];
|
= palette[num_new_palette];
|
||||||
if (!full_quantize)
|
if (full_quantize == 0)
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
|
|
||||||
@@ -702,7 +702,7 @@ png_set_quantize(png_structp png_ptr, png_colorp palette,
|
|||||||
}
|
}
|
||||||
png_ptr->num_palette = (png_uint_16)num_palette;
|
png_ptr->num_palette = (png_uint_16)num_palette;
|
||||||
|
|
||||||
if (full_quantize)
|
if (full_quantize != 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
png_bytep distance;
|
png_bytep distance;
|
||||||
@@ -971,7 +971,7 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
|
|||||||
png_uint_16 red_int, green_int;
|
png_uint_16 red_int, green_int;
|
||||||
|
|
||||||
/* NOTE: this calculation does not round, but this behavior is retained
|
/* NOTE: this calculation does not round, but this behavior is retained
|
||||||
* for consistency, the inaccuracy is very small. The code here always
|
* for consistency; the inaccuracy is very small. The code here always
|
||||||
* overwrites the coefficients, regardless of whether they have been
|
* overwrites the coefficients, regardless of whether they have been
|
||||||
* defaulted or set already.
|
* defaulted or set already.
|
||||||
*/
|
*/
|
||||||
@@ -1070,7 +1070,7 @@ png_gamma_threshold(png_fixed_point screen_gamma, png_fixed_point file_gamma)
|
|||||||
* the palette.
|
* the palette.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*For the moment 'png_init_palette_transformations' and
|
/* For the moment 'png_init_palette_transformations' and
|
||||||
* 'png_init_rgb_transformations' only do some flag canceling optimizations.
|
* 'png_init_rgb_transformations' only do some flag canceling optimizations.
|
||||||
* The intent is that these two routines should have palette or rgb operations
|
* The intent is that these two routines should have palette or rgb operations
|
||||||
* extracted from 'png_init_read_transformations'.
|
* extracted from 'png_init_read_transformations'.
|
||||||
@@ -1095,25 +1095,31 @@ png_init_palette_transformations(png_structp png_ptr)
|
|||||||
|
|
||||||
/* Ignore if all the entries are opaque (unlikely!) */
|
/* Ignore if all the entries are opaque (unlikely!) */
|
||||||
for (i=0; i<png_ptr->num_trans; ++i)
|
for (i=0; i<png_ptr->num_trans; ++i)
|
||||||
|
{
|
||||||
if (png_ptr->trans_alpha[i] == 255)
|
if (png_ptr->trans_alpha[i] == 255)
|
||||||
continue;
|
continue;
|
||||||
else if (png_ptr->trans_alpha[i] == 0)
|
else if (png_ptr->trans_alpha[i] == 0)
|
||||||
input_has_transparency = 1;
|
input_has_transparency = 1;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
input_has_transparency = 1;
|
||||||
input_has_alpha = 1;
|
input_has_alpha = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If no alpha we can optimize. */
|
/* If no alpha we can optimize. */
|
||||||
if (!input_has_alpha)
|
if (input_has_alpha == 0)
|
||||||
{
|
{
|
||||||
/* Any alpha means background and associative alpha processing is
|
/* Any alpha means background and associative alpha processing is
|
||||||
* required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA
|
* required, however if the alpha is 0 or 1 throughout OPTIMIZE_ALPHA
|
||||||
* and ENCODE_ALPHA are irrelevant.
|
* and ENCODE_ALPHA are irrelevant.
|
||||||
*/
|
*/
|
||||||
png_ptr->transformations &= ~PNG_ENCODE_ALPHA;
|
png_ptr->transformations &= ~PNG_ENCODE_ALPHA;
|
||||||
png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA;
|
png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA;
|
||||||
|
|
||||||
if (!input_has_transparency)
|
if (input_has_transparency == 0)
|
||||||
png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND);
|
png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1169,10 +1175,10 @@ png_init_rgb_transformations(png_structp png_ptr)
|
|||||||
int input_has_transparency = png_ptr->num_trans > 0;
|
int input_has_transparency = png_ptr->num_trans > 0;
|
||||||
|
|
||||||
/* If no alpha we can optimize. */
|
/* If no alpha we can optimize. */
|
||||||
if (!input_has_alpha)
|
if (input_has_alpha == 0)
|
||||||
{
|
{
|
||||||
/* Any alpha means background and associative alpha processing is
|
/* Any alpha means background and associative alpha processing is
|
||||||
* required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA
|
* required, however if the alpha is 0 or 1 throughout OPTIMIZE_ALPHA
|
||||||
* and ENCODE_ALPHA are irrelevant.
|
* and ENCODE_ALPHA are irrelevant.
|
||||||
*/
|
*/
|
||||||
# ifdef PNG_READ_ALPHA_MODE_SUPPORTED
|
# ifdef PNG_READ_ALPHA_MODE_SUPPORTED
|
||||||
@@ -1180,7 +1186,7 @@ png_init_rgb_transformations(png_structp png_ptr)
|
|||||||
png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA;
|
png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
if (!input_has_transparency)
|
if (input_has_transparency == 0)
|
||||||
png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND);
|
png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1306,7 +1312,7 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
* the code immediately below if the transform can be handled outside the
|
* the code immediately below if the transform can be handled outside the
|
||||||
* row loop.
|
* row loop.
|
||||||
*/
|
*/
|
||||||
if (gamma_correction)
|
if (gamma_correction != 0)
|
||||||
png_ptr->transformations |= PNG_GAMMA;
|
png_ptr->transformations |= PNG_GAMMA;
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -1315,7 +1321,7 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Certain transformations have the effect of preventing other
|
/* Certain transformations have the effect of preventing other
|
||||||
* transformations that happen afterward in png_do_read_transformations,
|
* transformations that happen afterward in png_do_read_transformations;
|
||||||
* resolve the interdependencies here. From the code of
|
* resolve the interdependencies here. From the code of
|
||||||
* png_do_read_transformations the order is:
|
* png_do_read_transformations the order is:
|
||||||
*
|
*
|
||||||
@@ -1704,11 +1710,11 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
g_sig = png_gamma_significant(g);
|
g_sig = png_gamma_significant(g);
|
||||||
gs_sig = png_gamma_significant(gs);
|
gs_sig = png_gamma_significant(gs);
|
||||||
|
|
||||||
if (g_sig)
|
if (g_sig != 0)
|
||||||
png_ptr->background_1.gray = png_gamma_correct(png_ptr,
|
png_ptr->background_1.gray = png_gamma_correct(png_ptr,
|
||||||
png_ptr->background.gray, g);
|
png_ptr->background.gray, g);
|
||||||
|
|
||||||
if (gs_sig)
|
if (gs_sig != 0)
|
||||||
png_ptr->background.gray = png_gamma_correct(png_ptr,
|
png_ptr->background.gray = png_gamma_correct(png_ptr,
|
||||||
png_ptr->background.gray, gs);
|
png_ptr->background.gray, gs);
|
||||||
|
|
||||||
@@ -1717,7 +1723,7 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
(png_ptr->background.red != png_ptr->background.gray))
|
(png_ptr->background.red != png_ptr->background.gray))
|
||||||
{
|
{
|
||||||
/* RGB or RGBA with color background */
|
/* RGB or RGBA with color background */
|
||||||
if (g_sig)
|
if (g_sig != 0)
|
||||||
{
|
{
|
||||||
png_ptr->background_1.red = png_gamma_correct(png_ptr,
|
png_ptr->background_1.red = png_gamma_correct(png_ptr,
|
||||||
png_ptr->background.red, g);
|
png_ptr->background.red, g);
|
||||||
@@ -1729,7 +1735,7 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
png_ptr->background.blue, g);
|
png_ptr->background.blue, g);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gs_sig)
|
if (gs_sig != 0)
|
||||||
{
|
{
|
||||||
png_ptr->background.red = png_gamma_correct(png_ptr,
|
png_ptr->background.red = png_gamma_correct(png_ptr,
|
||||||
png_ptr->background.red, gs);
|
png_ptr->background.red, gs);
|
||||||
@@ -1900,6 +1906,9 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
|
|
||||||
info_ptr->bit_depth = 8;
|
info_ptr->bit_depth = 8;
|
||||||
info_ptr->num_trans = 0;
|
info_ptr->num_trans = 0;
|
||||||
|
|
||||||
|
if (png_ptr->palette == NULL)
|
||||||
|
png_error (png_ptr, "Palette is NULL in indexed image");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2069,7 +2078,7 @@ defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
|
|||||||
png_ptr->info_rowbytes = info_ptr->rowbytes;
|
png_ptr->info_rowbytes = info_ptr->rowbytes;
|
||||||
|
|
||||||
#ifndef PNG_READ_EXPAND_SUPPORTED
|
#ifndef PNG_READ_EXPAND_SUPPORTED
|
||||||
if (png_ptr)
|
if (png_ptr != NULL)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -2146,7 +2155,7 @@ png_do_read_transformations(png_structp png_ptr, png_row_infop row_info)
|
|||||||
png_do_rgb_to_gray(png_ptr, row_info,
|
png_do_rgb_to_gray(png_ptr, row_info,
|
||||||
png_ptr->row_buf + 1);
|
png_ptr->row_buf + 1);
|
||||||
|
|
||||||
if (rgb_error)
|
if (rgb_error != 0)
|
||||||
{
|
{
|
||||||
png_ptr->rgb_to_gray_status=1;
|
png_ptr->rgb_to_gray_status=1;
|
||||||
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
|
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
|
||||||
@@ -2524,7 +2533,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row,
|
|||||||
have_shift = 1;
|
have_shift = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!have_shift)
|
if (have_shift == 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3285,7 +3294,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
*(dp++) = red;
|
*(dp++) = red;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_alpha)
|
if (have_alpha != 0)
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3314,7 +3323,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
else
|
else
|
||||||
*(dp++) = red;
|
*(dp++) = red;
|
||||||
|
|
||||||
if (have_alpha)
|
if (have_alpha != 0)
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3366,7 +3375,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
*(dp++) = (png_byte)((w>>8) & 0xff);
|
*(dp++) = (png_byte)((w>>8) & 0xff);
|
||||||
*(dp++) = (png_byte)(w & 0xff);
|
*(dp++) = (png_byte)(w & 0xff);
|
||||||
|
|
||||||
if (have_alpha)
|
if (have_alpha != 0)
|
||||||
{
|
{
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
@@ -3400,7 +3409,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
|
|||||||
*(dp++) = (png_byte)((gray16>>8) & 0xff);
|
*(dp++) = (png_byte)((gray16>>8) & 0xff);
|
||||||
*(dp++) = (png_byte)(gray16 & 0xff);
|
*(dp++) = (png_byte)(gray16 & 0xff);
|
||||||
|
|
||||||
if (have_alpha)
|
if (have_alpha != 0)
|
||||||
{
|
{
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
*(dp++) = *(sp++);
|
*(dp++) = *(sp++);
|
||||||
@@ -3526,7 +3535,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
*sp |= (png_byte)(png_ptr->background.gray << shift);
|
*sp |= (png_byte)(png_ptr->background.gray << shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shift)
|
if (shift == 0)
|
||||||
{
|
{
|
||||||
shift = 7;
|
shift = 7;
|
||||||
sp++;
|
sp++;
|
||||||
@@ -3563,7 +3572,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
*sp |= (png_byte)(g << shift);
|
*sp |= (png_byte)(g << shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shift)
|
if (shift == 0)
|
||||||
{
|
{
|
||||||
shift = 6;
|
shift = 6;
|
||||||
sp++;
|
sp++;
|
||||||
@@ -3588,7 +3597,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
*sp |= (png_byte)(png_ptr->background.gray << shift);
|
*sp |= (png_byte)(png_ptr->background.gray << shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shift)
|
if (shift == 0)
|
||||||
{
|
{
|
||||||
shift = 6;
|
shift = 6;
|
||||||
sp++;
|
sp++;
|
||||||
@@ -3626,7 +3635,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
*sp |= (png_byte)(g << shift);
|
*sp |= (png_byte)(g << shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shift)
|
if (shift == 0)
|
||||||
{
|
{
|
||||||
shift = 4;
|
shift = 4;
|
||||||
sp++;
|
sp++;
|
||||||
@@ -3651,7 +3660,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
*sp |= (png_byte)(png_ptr->background.gray << shift);
|
*sp |= (png_byte)(png_ptr->background.gray << shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shift)
|
if (shift == 0)
|
||||||
{
|
{
|
||||||
shift = 4;
|
shift = 4;
|
||||||
sp++;
|
sp++;
|
||||||
@@ -3904,7 +3913,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
|
|
||||||
v = gamma_to_1[*sp];
|
v = gamma_to_1[*sp];
|
||||||
png_composite(w, v, a, png_ptr->background_1.gray);
|
png_composite(w, v, a, png_ptr->background_1.gray);
|
||||||
if (!optimize)
|
if (optimize == 0)
|
||||||
w = gamma_from_1[w];
|
w = gamma_from_1[w];
|
||||||
*sp = w;
|
*sp = w;
|
||||||
}
|
}
|
||||||
@@ -3961,7 +3970,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
|
|
||||||
g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
|
g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
|
||||||
png_composite_16(v, g, a, png_ptr->background_1.gray);
|
png_composite_16(v, g, a, png_ptr->background_1.gray);
|
||||||
if (optimize)
|
if (optimize != 0)
|
||||||
w = v;
|
w = v;
|
||||||
else
|
else
|
||||||
w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8];
|
w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8];
|
||||||
@@ -4035,17 +4044,17 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
|
|
||||||
v = gamma_to_1[*sp];
|
v = gamma_to_1[*sp];
|
||||||
png_composite(w, v, a, png_ptr->background_1.red);
|
png_composite(w, v, a, png_ptr->background_1.red);
|
||||||
if (!optimize) w = gamma_from_1[w];
|
if (optimize == 0) w = gamma_from_1[w];
|
||||||
*sp = w;
|
*sp = w;
|
||||||
|
|
||||||
v = gamma_to_1[*(sp + 1)];
|
v = gamma_to_1[*(sp + 1)];
|
||||||
png_composite(w, v, a, png_ptr->background_1.green);
|
png_composite(w, v, a, png_ptr->background_1.green);
|
||||||
if (!optimize) w = gamma_from_1[w];
|
if (optimize == 0) w = gamma_from_1[w];
|
||||||
*(sp + 1) = w;
|
*(sp + 1) = w;
|
||||||
|
|
||||||
v = gamma_to_1[*(sp + 2)];
|
v = gamma_to_1[*(sp + 2)];
|
||||||
png_composite(w, v, a, png_ptr->background_1.blue);
|
png_composite(w, v, a, png_ptr->background_1.blue);
|
||||||
if (!optimize) w = gamma_from_1[w];
|
if (optimize == 0) w = gamma_from_1[w];
|
||||||
*(sp + 2) = w;
|
*(sp + 2) = w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4127,7 +4136,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
|
|
||||||
v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
|
v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
|
||||||
png_composite_16(w, v, a, png_ptr->background_1.red);
|
png_composite_16(w, v, a, png_ptr->background_1.red);
|
||||||
if (!optimize)
|
if (optimize == 0)
|
||||||
w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
|
w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
|
||||||
[w >> 8];
|
[w >> 8];
|
||||||
*sp = (png_byte)((w >> 8) & 0xff);
|
*sp = (png_byte)((w >> 8) & 0xff);
|
||||||
@@ -4135,7 +4144,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
|
|
||||||
v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
|
v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
|
||||||
png_composite_16(w, v, a, png_ptr->background_1.green);
|
png_composite_16(w, v, a, png_ptr->background_1.green);
|
||||||
if (!optimize)
|
if (optimize == 0)
|
||||||
w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
|
w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
|
||||||
[w >> 8];
|
[w >> 8];
|
||||||
|
|
||||||
@@ -4144,7 +4153,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
|
|
||||||
v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];
|
v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];
|
||||||
png_composite_16(w, v, a, png_ptr->background_1.blue);
|
png_composite_16(w, v, a, png_ptr->background_1.blue);
|
||||||
if (!optimize)
|
if (optimize == 0)
|
||||||
w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
|
w = gamma_16_from_1[((w&0xff) >> gamma_shift)]
|
||||||
[w >> 8];
|
[w >> 8];
|
||||||
|
|
||||||
|
|||||||
46
pngrutil.c
46
pngrutil.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.16 [May 23, 2013]
|
* Last changed in libpng 1.5.21 [December 22, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -209,7 +209,7 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip)
|
|||||||
png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
|
png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i)
|
if (i != 0)
|
||||||
{
|
{
|
||||||
png_crc_read(png_ptr, png_ptr->zbuf, i);
|
png_crc_read(png_ptr, png_ptr->zbuf, i);
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ png_crc_error(png_structp png_ptr)
|
|||||||
/* The chunk CRC must be serialized in a single I/O call. */
|
/* The chunk CRC must be serialized in a single I/O call. */
|
||||||
png_read_data(png_ptr, crc_bytes, 4);
|
png_read_data(png_ptr, crc_bytes, 4);
|
||||||
|
|
||||||
if (need_crc)
|
if (need_crc != 0)
|
||||||
{
|
{
|
||||||
crc = png_get_uint_32(crc_bytes);
|
crc = png_get_uint_32(crc_bytes);
|
||||||
return ((int)(crc != png_ptr->crc));
|
return ((int)(crc != png_ptr->crc));
|
||||||
@@ -282,6 +282,17 @@ png_inflate(png_structp png_ptr, png_bytep data, png_size_t size,
|
|||||||
{
|
{
|
||||||
png_size_t count = 0;
|
png_size_t count = 0;
|
||||||
|
|
||||||
|
/* HACK: added in libpng 1.5.18: the progressive reader always leaves
|
||||||
|
* png_ptr->zstream in a non-reset state. This causes a reset if it needs to
|
||||||
|
* be used again. This only copes with that one specific error; see libpng
|
||||||
|
* 1.6 for a better solution.
|
||||||
|
*/
|
||||||
|
if ((png_ptr->flags & PNG_FLAG_ZSTREAM_PROGRESSIVE) != 0)
|
||||||
|
{
|
||||||
|
(void)inflateReset(&png_ptr->zstream);
|
||||||
|
png_ptr->flags &= ~PNG_FLAG_ZSTREAM_PROGRESSIVE;
|
||||||
|
}
|
||||||
|
|
||||||
/* zlib can't necessarily handle more than 65535 bytes at once (i.e. it can't
|
/* zlib can't necessarily handle more than 65535 bytes at once (i.e. it can't
|
||||||
* even necessarily handle 65536 bytes) because the type uInt is "16 bits or
|
* even necessarily handle 65536 bytes) because the type uInt is "16 bits or
|
||||||
* more". Consequently it is necessary to chunk the input to zlib. This
|
* more". Consequently it is necessary to chunk the input to zlib. This
|
||||||
@@ -1307,7 +1318,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
/* Compression_type should always be zero */
|
/* Compression_type should always be zero */
|
||||||
compression_type = *profile++;
|
compression_type = *profile++;
|
||||||
|
|
||||||
if (compression_type)
|
if (compression_type != 0)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "Ignoring nonzero compression type in iCCP chunk");
|
png_warning(png_ptr, "Ignoring nonzero compression type in iCCP chunk");
|
||||||
compression_type = 0x00; /* Reset it to zero (libpng-1.0.6 through 1.0.8
|
compression_type = 0x00; /* Reset it to zero (libpng-1.0.6 through 1.0.8
|
||||||
@@ -2307,7 +2318,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
png_ptr->chunkdata = NULL;
|
png_ptr->chunkdata = NULL;
|
||||||
png_free(png_ptr, text_ptr);
|
png_free(png_ptr, text_ptr);
|
||||||
|
|
||||||
if (ret)
|
if (ret != 0)
|
||||||
png_warning(png_ptr, "Insufficient memory to process text chunk");
|
png_warning(png_ptr, "Insufficient memory to process text chunk");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -2437,7 +2448,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
png_free(png_ptr, png_ptr->chunkdata);
|
png_free(png_ptr, png_ptr->chunkdata);
|
||||||
png_ptr->chunkdata = NULL;
|
png_ptr->chunkdata = NULL;
|
||||||
|
|
||||||
if (ret)
|
if (ret != 0)
|
||||||
png_error(png_ptr, "Insufficient memory to store zTXt chunk");
|
png_error(png_ptr, "Insufficient memory to store zTXt chunk");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -2617,7 +2628,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
png_free(png_ptr, png_ptr->chunkdata);
|
png_free(png_ptr, png_ptr->chunkdata);
|
||||||
png_ptr->chunkdata = NULL;
|
png_ptr->chunkdata = NULL;
|
||||||
|
|
||||||
if (ret)
|
if (ret != 0)
|
||||||
png_error(png_ptr, "Insufficient memory to store iTXt chunk");
|
png_error(png_ptr, "Insufficient memory to store iTXt chunk");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -2794,7 +2805,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
{
|
{
|
||||||
unsigned int pixel_depth = png_ptr->transformed_pixel_depth;
|
unsigned int pixel_depth = png_ptr->transformed_pixel_depth;
|
||||||
png_const_bytep sp = png_ptr->row_buf + 1;
|
png_const_bytep sp = png_ptr->row_buf + 1;
|
||||||
png_uint_32 row_width = png_ptr->width;
|
png_alloc_size_t row_width = png_ptr->width;
|
||||||
unsigned int pass = png_ptr->pass;
|
unsigned int pass = png_ptr->pass;
|
||||||
png_bytep end_ptr = 0;
|
png_bytep end_ptr = 0;
|
||||||
png_byte end_byte = 0;
|
png_byte end_byte = 0;
|
||||||
@@ -2946,7 +2957,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
# define S_MASKS(d,s) { S_MASK(0,d,s), S_MASK(1,d,s), S_MASK(2,d,s),\
|
# define S_MASKS(d,s) { S_MASK(0,d,s), S_MASK(1,d,s), S_MASK(2,d,s),\
|
||||||
S_MASK(3,d,s), S_MASK(4,d,s), S_MASK(5,d,s) }
|
S_MASK(3,d,s), S_MASK(4,d,s), S_MASK(5,d,s) }
|
||||||
|
|
||||||
# define B_MASKS(d,s) { B_MASK(1,d,s), S_MASK(3,d,s), S_MASK(5,d,s) }
|
# define B_MASKS(d,s) { B_MASK(1,d,s), B_MASK(3,d,s), B_MASK(5,d,s) }
|
||||||
|
|
||||||
# define DEPTH_INDEX(d) ((d)==1?0:((d)==2?1:2))
|
# define DEPTH_INDEX(d) ((d)==1?0:((d)==2?1:2))
|
||||||
|
|
||||||
@@ -3057,7 +3068,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Work out the bytes to copy. */
|
/* Work out the bytes to copy. */
|
||||||
if (display)
|
if (display != 0)
|
||||||
{
|
{
|
||||||
/* When doing the 'block' algorithm the pixel in the pass gets
|
/* When doing the 'block' algorithm the pixel in the pass gets
|
||||||
* replicated to adjacent pixels. This is why the even (0,2,4,6)
|
* replicated to adjacent pixels. This is why the even (0,2,4,6)
|
||||||
@@ -3067,7 +3078,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
|
|
||||||
/* But don't allow this number to exceed the actual row width. */
|
/* But don't allow this number to exceed the actual row width. */
|
||||||
if (bytes_to_copy > row_width)
|
if (bytes_to_copy > row_width)
|
||||||
bytes_to_copy = row_width;
|
bytes_to_copy = (unsigned int)/*SAFE*/row_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
else /* normal row; Adam7 only ever gives us one pixel to copy. */
|
else /* normal row; Adam7 only ever gives us one pixel to copy. */
|
||||||
@@ -3245,7 +3256,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
dp += bytes_to_jump;
|
dp += bytes_to_jump;
|
||||||
row_width -= bytes_to_jump;
|
row_width -= bytes_to_jump;
|
||||||
if (bytes_to_copy > row_width)
|
if (bytes_to_copy > row_width)
|
||||||
bytes_to_copy = row_width;
|
bytes_to_copy = (unsigned int)/*SAFE*/row_width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3484,7 +3495,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
|||||||
|
|
||||||
for (i = 0; i < row_info->width; i++)
|
for (i = 0; i < row_info->width; i++)
|
||||||
{
|
{
|
||||||
png_byte v[8];
|
png_byte v[8]; /* SAFE; pixel_depth does not exceed 64 */
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
png_memcpy(v, sp, pixel_bytes);
|
png_memcpy(v, sp, pixel_bytes);
|
||||||
@@ -3700,10 +3711,13 @@ void /* PRIVATE */
|
|||||||
png_read_filter_row(png_structp pp, png_row_infop row_info, png_bytep row,
|
png_read_filter_row(png_structp pp, png_row_infop row_info, png_bytep row,
|
||||||
png_const_bytep prev_row, int filter)
|
png_const_bytep prev_row, int filter)
|
||||||
{
|
{
|
||||||
if (pp->read_filter[0] == NULL)
|
|
||||||
png_init_filter_functions(pp);
|
|
||||||
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
||||||
|
{
|
||||||
|
if (pp->read_filter[0] == NULL)
|
||||||
|
png_init_filter_functions(pp);
|
||||||
|
|
||||||
pp->read_filter[filter-1](row_info, row, prev_row);
|
pp->read_filter[filter-1](row_info, row, prev_row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||||
|
|||||||
41
pngset.c
41
pngset.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.14 [January 24, 2013]
|
* Last changed in libpng 1.5.20 [November 20, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -252,16 +252,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
|
|||||||
|
|
||||||
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
|
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
|
||||||
|
|
||||||
/* Check for potential overflow */
|
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
|
||||||
if (width >
|
|
||||||
(PNG_UINT_32_MAX >> 3) /* 8-byte RRGGBBAA pixels */
|
|
||||||
- 48 /* bigrowbuf hack */
|
|
||||||
- 1 /* filter byte */
|
|
||||||
- 7*8 /* rounding of width to multiple of 8 pixels */
|
|
||||||
- 8) /* extra max_pixel_depth pad */
|
|
||||||
info_ptr->rowbytes = 0;
|
|
||||||
else
|
|
||||||
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_oFFs_SUPPORTED
|
#ifdef PNG_oFFs_SUPPORTED
|
||||||
@@ -671,7 +662,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_const_textp text_ptr,
|
|||||||
int ret;
|
int ret;
|
||||||
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, num_text);
|
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, num_text);
|
||||||
|
|
||||||
if (ret)
|
if (ret != 0)
|
||||||
png_error(png_ptr, "Insufficient memory to store text");
|
png_error(png_ptr, "Insufficient memory to store text");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -680,6 +671,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_const_textp text_ptr, int num_text)
|
png_const_textp text_ptr, int num_text)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
size_t element_size;
|
||||||
|
|
||||||
png_debug1(1, "in %lx storage function", png_ptr == NULL ? "unexpected" :
|
png_debug1(1, "in %lx storage function", png_ptr == NULL ? "unexpected" :
|
||||||
(unsigned long)png_ptr->chunk_name);
|
(unsigned long)png_ptr->chunk_name);
|
||||||
@@ -691,11 +683,12 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr,
|
|||||||
* to hold all of the incoming text_ptr objects.
|
* to hold all of the incoming text_ptr objects.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
element_size=png_sizeof(png_text);
|
||||||
if (num_text < 0 ||
|
if (num_text < 0 ||
|
||||||
num_text > INT_MAX - info_ptr->num_text - 8 ||
|
num_text > INT_MAX - info_ptr->num_text - 8 ||
|
||||||
(unsigned int)/*SAFE*/(num_text +/*SAFE*/
|
(unsigned int)/*SAFE*/(num_text +/*SAFE*/
|
||||||
info_ptr->num_text + 8) >=
|
info_ptr->num_text + 8) >=
|
||||||
PNG_SIZE_MAX/png_sizeof(png_text))
|
PNG_SIZE_MAX/element_size)
|
||||||
{
|
{
|
||||||
png_warning(png_ptr, "too many text chunks");
|
png_warning(png_ptr, "too many text chunks");
|
||||||
return(0);
|
return(0);
|
||||||
@@ -847,7 +840,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr,
|
|||||||
textp->text = textp->key + key_len + 1;
|
textp->text = textp->key + key_len + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (text_length)
|
if (text_length != 0)
|
||||||
png_memcpy(textp->text, text_ptr[i].text,
|
png_memcpy(textp->text, text_ptr[i].text,
|
||||||
(png_size_t)(text_length));
|
(png_size_t)(text_length));
|
||||||
|
|
||||||
@@ -976,15 +969,17 @@ png_set_sPLT(png_structp png_ptr,
|
|||||||
{
|
{
|
||||||
png_sPLT_tp np;
|
png_sPLT_tp np;
|
||||||
int i;
|
int i;
|
||||||
|
size_t element_size;
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
element_size = PNG_SIZE_MAX/png_sizeof(png_sPLT_t);
|
||||||
if (nentries < 0 ||
|
if (nentries < 0 ||
|
||||||
nentries > INT_MAX-info_ptr->splt_palettes_num ||
|
nentries > INT_MAX-info_ptr->splt_palettes_num ||
|
||||||
(unsigned int)/*SAFE*/(nentries +/*SAFE*/
|
(unsigned int)/*SAFE*/(nentries +/*SAFE*/
|
||||||
info_ptr->splt_palettes_num) >=
|
info_ptr->splt_palettes_num) >=
|
||||||
PNG_SIZE_MAX/png_sizeof(png_sPLT_t))
|
PNG_SIZE_MAX/element_size)
|
||||||
np=NULL;
|
np=NULL;
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -1055,15 +1050,17 @@ png_set_unknown_chunks(png_structp png_ptr,
|
|||||||
{
|
{
|
||||||
png_unknown_chunkp np;
|
png_unknown_chunkp np;
|
||||||
int i;
|
int i;
|
||||||
|
size_t element_size;
|
||||||
|
|
||||||
if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0)
|
if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
element_size = PNG_SIZE_MAX/png_sizeof(png_unknown_chunk);
|
||||||
if (num_unknowns < 0 ||
|
if (num_unknowns < 0 ||
|
||||||
num_unknowns > INT_MAX-info_ptr->unknown_chunks_num ||
|
num_unknowns > INT_MAX-info_ptr->unknown_chunks_num ||
|
||||||
(unsigned int)/*SAFE*/(num_unknowns +/*SAFE*/
|
(unsigned int)/*SAFE*/(num_unknowns +/*SAFE*/
|
||||||
info_ptr->unknown_chunks_num) >=
|
info_ptr->unknown_chunks_num) >=
|
||||||
PNG_SIZE_MAX/png_sizeof(png_unknown_chunk))
|
PNG_SIZE_MAX/element_size)
|
||||||
np=NULL;
|
np=NULL;
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -1232,7 +1229,7 @@ png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
|
|||||||
|
|
||||||
info_ptr->row_pointers = row_pointers;
|
info_ptr->row_pointers = row_pointers;
|
||||||
|
|
||||||
if (row_pointers)
|
if (row_pointers != NULL)
|
||||||
info_ptr->valid |= PNG_INFO_IDAT;
|
info_ptr->valid |= PNG_INFO_IDAT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1296,7 +1293,7 @@ void PNGAPI
|
|||||||
png_set_chunk_cache_max (png_structp png_ptr,
|
png_set_chunk_cache_max (png_structp png_ptr,
|
||||||
png_uint_32 user_chunk_cache_max)
|
png_uint_32 user_chunk_cache_max)
|
||||||
{
|
{
|
||||||
if (png_ptr)
|
if (png_ptr != NULL)
|
||||||
png_ptr->user_chunk_cache_max = user_chunk_cache_max;
|
png_ptr->user_chunk_cache_max = user_chunk_cache_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1305,7 +1302,7 @@ void PNGAPI
|
|||||||
png_set_chunk_malloc_max (png_structp png_ptr,
|
png_set_chunk_malloc_max (png_structp png_ptr,
|
||||||
png_alloc_size_t user_chunk_malloc_max)
|
png_alloc_size_t user_chunk_malloc_max)
|
||||||
{
|
{
|
||||||
if (png_ptr)
|
if (png_ptr != NULL)
|
||||||
png_ptr->user_chunk_malloc_max = user_chunk_malloc_max;
|
png_ptr->user_chunk_malloc_max = user_chunk_malloc_max;
|
||||||
}
|
}
|
||||||
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
|
||||||
@@ -1317,7 +1314,7 @@ png_set_benign_errors(png_structp png_ptr, int allowed)
|
|||||||
{
|
{
|
||||||
png_debug(1, "in png_set_benign_errors");
|
png_debug(1, "in png_set_benign_errors");
|
||||||
|
|
||||||
if (allowed)
|
if (allowed != 0)
|
||||||
png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;
|
png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -1334,7 +1331,7 @@ png_set_check_for_invalid_index(png_structp png_ptr, int allowed)
|
|||||||
{
|
{
|
||||||
png_debug(1, "in png_set_check_for_invalid_index");
|
png_debug(1, "in png_set_check_for_invalid_index");
|
||||||
|
|
||||||
if (allowed)
|
if (allowed != 0)
|
||||||
png_ptr->num_palette_max = 0;
|
png_ptr->num_palette_max = 0;
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
130
pngtest.c
130
pngtest.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.15 [March 28, 2013]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -43,6 +43,14 @@
|
|||||||
|
|
||||||
#include "png.h"
|
#include "png.h"
|
||||||
|
|
||||||
|
/* Known chunks that exist in pngtest.png must be supported or pngtest will fail
|
||||||
|
* simply as a result of re-ordering them. This may be fixed in 1.7
|
||||||
|
*
|
||||||
|
* pngtest allocates a single row buffer for each row and overwrites it,
|
||||||
|
* therefore if the write side doesn't support the writing of interlaced images
|
||||||
|
* nothing can be done for an interlaced image (and the code below will fail
|
||||||
|
* horribly trying to write extra data after writing garbage).
|
||||||
|
*/
|
||||||
#if defined PNG_READ_SUPPORTED && /* else nothing can be done */\
|
#if defined PNG_READ_SUPPORTED && /* else nothing can be done */\
|
||||||
defined PNG_READ_bKGD_SUPPORTED &&\
|
defined PNG_READ_bKGD_SUPPORTED &&\
|
||||||
defined PNG_READ_cHRM_SUPPORTED &&\
|
defined PNG_READ_cHRM_SUPPORTED &&\
|
||||||
@@ -55,9 +63,15 @@
|
|||||||
defined PNG_READ_sRGB_SUPPORTED &&\
|
defined PNG_READ_sRGB_SUPPORTED &&\
|
||||||
defined PNG_READ_tEXt_SUPPORTED &&\
|
defined PNG_READ_tEXt_SUPPORTED &&\
|
||||||
defined PNG_READ_tIME_SUPPORTED &&\
|
defined PNG_READ_tIME_SUPPORTED &&\
|
||||||
defined PNG_READ_zTXt_SUPPORTED
|
defined PNG_READ_zTXt_SUPPORTED &&\
|
||||||
|
defined PNG_WRITE_INTERLACING_SUPPORTED
|
||||||
|
|
||||||
|
#ifdef PNG_ZLIB_HEADER
|
||||||
|
# include PNG_ZLIB_HEADER /* defined by pnglibconf.h from 1.7 */
|
||||||
|
#else
|
||||||
|
# include "zlib.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "zlib.h"
|
|
||||||
/* Copied from pngpriv.h but only used in error messages below. */
|
/* Copied from pngpriv.h but only used in error messages below. */
|
||||||
#ifndef PNG_ZBUF_SIZE
|
#ifndef PNG_ZBUF_SIZE
|
||||||
# define PNG_ZBUF_SIZE 8192
|
# define PNG_ZBUF_SIZE 8192
|
||||||
@@ -113,10 +127,6 @@ static int unsupported_chunks = 0; /* chunk unsupported by libpng in input */
|
|||||||
static int error_count = 0; /* count calls to png_error */
|
static int error_count = 0; /* count calls to png_error */
|
||||||
static int warning_count = 0; /* count calls to png_warning */
|
static int warning_count = 0; /* count calls to png_warning */
|
||||||
|
|
||||||
#ifdef __TURBOC__
|
|
||||||
#include <mem.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
||||||
#ifndef png_jmpbuf
|
#ifndef png_jmpbuf
|
||||||
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
||||||
@@ -349,7 +359,7 @@ pngtest_check_io_state(png_structp png_ptr, png_size_t data_length,
|
|||||||
default:
|
default:
|
||||||
err = 1; /* uninitialized */
|
err = 1; /* uninitialized */
|
||||||
}
|
}
|
||||||
if (err)
|
if (err != 0)
|
||||||
png_error(png_ptr, "Bad I/O state or buffer size");
|
png_error(png_ptr, "Bad I/O state or buffer size");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -530,7 +540,7 @@ PNGCBAPI png_debug_malloc(png_structp png_ptr, png_alloc_size_t size)
|
|||||||
/* Make sure the caller isn't assuming zeroed memory. */
|
/* Make sure the caller isn't assuming zeroed memory. */
|
||||||
memset(pinfo->pointer, 0xdd, pinfo->size);
|
memset(pinfo->pointer, 0xdd, pinfo->size);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose != 0)
|
||||||
printf("png_malloc %lu bytes at %p\n", (unsigned long)size,
|
printf("png_malloc %lu bytes at %p\n", (unsigned long)size,
|
||||||
pinfo->pointer);
|
pinfo->pointer);
|
||||||
|
|
||||||
@@ -570,7 +580,8 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
|
|||||||
/* We must free the list element too, but first kill
|
/* We must free the list element too, but first kill
|
||||||
the memory that is to be freed. */
|
the memory that is to be freed. */
|
||||||
memset(ptr, 0x55, pinfo->size);
|
memset(ptr, 0x55, pinfo->size);
|
||||||
png_free_default(png_ptr, pinfo);
|
if (pinfo != NULL)
|
||||||
|
free(pinfo);
|
||||||
pinfo = NULL;
|
pinfo = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -586,10 +597,11 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Finally free the data. */
|
/* Finally free the data. */
|
||||||
if (verbose)
|
if (verbose != 0)
|
||||||
printf("Freeing %p\n", ptr);
|
printf("Freeing %p\n", ptr);
|
||||||
|
|
||||||
png_free_default(png_ptr, ptr);
|
if (ptr != NULL)
|
||||||
|
free(ptr);
|
||||||
ptr = NULL;
|
ptr = NULL;
|
||||||
}
|
}
|
||||||
#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */
|
#endif /* PNG_USER_MEM_SUPPORTED && PNG_DEBUG */
|
||||||
@@ -634,7 +646,7 @@ set_location(png_structp png_ptr, struct user_chunk_data *data, int what)
|
|||||||
if ((data->location[0] & what) || (data->location[1] & what))
|
if ((data->location[0] & what) || (data->location[1] & what))
|
||||||
return 0; /* already have one of these */
|
return 0; /* already have one of these */
|
||||||
|
|
||||||
/* Find where we are (the code below zeros info_ptr to indicate that the
|
/* Find where we are (the code below zeroes info_ptr to indicate that the
|
||||||
* chunks before the first IDAT have been read.)
|
* chunks before the first IDAT have been read.)
|
||||||
*/
|
*/
|
||||||
if (data->info_ptr == NULL) /* after IDAT */
|
if (data->info_ptr == NULL) /* after IDAT */
|
||||||
@@ -720,22 +732,22 @@ static int PNGCBAPI read_user_chunk_callback(png_struct *png_ptr,
|
|||||||
static void
|
static void
|
||||||
write_sTER_chunk(png_structp write_ptr)
|
write_sTER_chunk(png_structp write_ptr)
|
||||||
{
|
{
|
||||||
png_byte png_sTER[5] = {115, 84, 69, 82, '\0'};
|
png_byte sTER[5] = {115, 84, 69, 82, '\0'};
|
||||||
|
|
||||||
if (verbose)
|
if (verbose != 0)
|
||||||
fprintf(STDERR, "\n stereo mode = %d\n", user_chunk_data.sTER_mode);
|
fprintf(STDERR, "\n stereo mode = %d\n", user_chunk_data.sTER_mode);
|
||||||
|
|
||||||
png_write_chunk(write_ptr, png_sTER, &user_chunk_data.sTER_mode, 1);
|
png_write_chunk(write_ptr, sTER, &user_chunk_data.sTER_mode, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_vpAg_chunk(png_structp write_ptr)
|
write_vpAg_chunk(png_structp write_ptr)
|
||||||
{
|
{
|
||||||
png_byte png_vpAg[5] = {118, 112, 65, 103, '\0'};
|
png_byte vpAg[5] = {118, 112, 65, 103, '\0'};
|
||||||
|
|
||||||
png_byte vpag_chunk_data[9];
|
png_byte vpag_chunk_data[9];
|
||||||
|
|
||||||
if (verbose)
|
if (verbose != 0)
|
||||||
fprintf(STDERR, " vpAg = %lu x %lu, units = %d\n",
|
fprintf(STDERR, " vpAg = %lu x %lu, units = %d\n",
|
||||||
(unsigned long)user_chunk_data.vpAg_width,
|
(unsigned long)user_chunk_data.vpAg_width,
|
||||||
(unsigned long)user_chunk_data.vpAg_height,
|
(unsigned long)user_chunk_data.vpAg_height,
|
||||||
@@ -744,7 +756,7 @@ write_vpAg_chunk(png_structp write_ptr)
|
|||||||
png_save_uint_32(vpag_chunk_data, user_chunk_data.vpAg_width);
|
png_save_uint_32(vpag_chunk_data, user_chunk_data.vpAg_width);
|
||||||
png_save_uint_32(vpag_chunk_data + 4, user_chunk_data.vpAg_height);
|
png_save_uint_32(vpag_chunk_data + 4, user_chunk_data.vpAg_height);
|
||||||
vpag_chunk_data[8] = user_chunk_data.vpAg_units;
|
vpag_chunk_data[8] = user_chunk_data.vpAg_units;
|
||||||
png_write_chunk(write_ptr, png_vpAg, vpag_chunk_data, 9);
|
png_write_chunk(write_ptr, vpAg, vpag_chunk_data, 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -825,6 +837,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
png_structp write_ptr;
|
png_structp write_ptr;
|
||||||
png_infop write_info_ptr;
|
png_infop write_info_ptr;
|
||||||
png_infop write_end_info_ptr;
|
png_infop write_end_info_ptr;
|
||||||
|
int interlace_preserved = 1;
|
||||||
#else
|
#else
|
||||||
png_structp write_ptr = NULL;
|
png_structp write_ptr = NULL;
|
||||||
png_infop write_info_ptr = NULL;
|
png_infop write_info_ptr = NULL;
|
||||||
@@ -833,7 +846,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
png_bytep row_buf;
|
png_bytep row_buf;
|
||||||
png_uint_32 y;
|
png_uint_32 y;
|
||||||
png_uint_32 width, height;
|
png_uint_32 width, height;
|
||||||
int num_pass, pass;
|
int num_pass = 1, pass;
|
||||||
int bit_depth, color_type;
|
int bit_depth, color_type;
|
||||||
|
|
||||||
row_buf = NULL;
|
row_buf = NULL;
|
||||||
@@ -925,7 +938,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (strict)
|
if (strict != 0)
|
||||||
{
|
{
|
||||||
/* Treat png_benign_error() as errors on read */
|
/* Treat png_benign_error() as errors on read */
|
||||||
png_set_benign_errors(read_ptr, 0);
|
png_set_benign_errors(read_ptr, 0);
|
||||||
@@ -941,7 +954,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (relaxed)
|
else if (relaxed != 0)
|
||||||
{
|
{
|
||||||
/* Allow application (pngtest) errors and warnings to pass */
|
/* Allow application (pngtest) errors and warnings to pass */
|
||||||
png_set_benign_errors(read_ptr, 1);
|
png_set_benign_errors(read_ptr, 1);
|
||||||
@@ -1039,10 +1052,26 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
&color_type, &interlace_type, &compression_type, &filter_type))
|
&color_type, &interlace_type, &compression_type, &filter_type))
|
||||||
{
|
{
|
||||||
png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth,
|
png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth,
|
||||||
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
|
|
||||||
color_type, interlace_type, compression_type, filter_type);
|
color_type, interlace_type, compression_type, filter_type);
|
||||||
#else
|
#ifndef PNG_READ_INTERLACING_SUPPORTED
|
||||||
color_type, PNG_INTERLACE_NONE, compression_type, filter_type);
|
/* num_pass will not be set below, set it here if the image is
|
||||||
|
* interlaced: what happens is that write interlacing is *not* turned
|
||||||
|
* on an the partial interlaced rows are written directly.
|
||||||
|
*/
|
||||||
|
switch (interlace_type)
|
||||||
|
{
|
||||||
|
case PNG_INTERLACE_NONE:
|
||||||
|
num_pass = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PNG_INTERLACE_ADAM7:
|
||||||
|
num_pass = 7;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
png_error(read_ptr, "invalid interlace type");
|
||||||
|
/*NOT REACHED*/
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1186,7 +1215,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef PNG_sCAL_SUPPORTED
|
#ifdef PNG_sCAL_SUPPORTED
|
||||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
#if defined(PNG_FLOATING_POINT_SUPPORTED) && \
|
||||||
|
defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)
|
||||||
{
|
{
|
||||||
int unit;
|
int unit;
|
||||||
double scal_width, scal_height;
|
double scal_width, scal_height;
|
||||||
@@ -1224,7 +1254,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
|
|
||||||
pngtest_check_text_support(read_ptr, text_ptr, num_text);
|
pngtest_check_text_support(read_ptr, text_ptr, num_text);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose != 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -1290,7 +1320,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
int num_unknowns = png_get_unknown_chunks(read_ptr, read_info_ptr,
|
int num_unknowns = png_get_unknown_chunks(read_ptr, read_info_ptr,
|
||||||
&unknowns);
|
&unknowns);
|
||||||
|
|
||||||
if (num_unknowns)
|
if (num_unknowns != 0)
|
||||||
{
|
{
|
||||||
png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns,
|
png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns,
|
||||||
num_unknowns);
|
num_unknowns);
|
||||||
@@ -1334,14 +1364,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
#endif /* SINGLE_ROWBUF_ALLOC */
|
#endif /* SINGLE_ROWBUF_ALLOC */
|
||||||
pngtest_debug("Writing row data");
|
pngtest_debug("Writing row data");
|
||||||
|
|
||||||
#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
|
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||||
defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
|
||||||
num_pass = png_set_interlace_handling(read_ptr);
|
num_pass = png_set_interlace_handling(read_ptr);
|
||||||
# ifdef PNG_WRITE_SUPPORTED
|
if (png_set_interlace_handling(write_ptr) != num_pass)
|
||||||
png_set_interlace_handling(write_ptr);
|
png_error(write_ptr, "png_set_interlace_handling: inconsistent num_pass");
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
num_pass = 1;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNGTEST_TIMING
|
#ifdef PNGTEST_TIMING
|
||||||
@@ -1387,11 +1413,13 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1);
|
# ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
#endif
|
png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1);
|
||||||
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
# endif
|
||||||
png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1);
|
# ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
|
||||||
|
png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pngtest_debug("Reading and writing end_info data");
|
pngtest_debug("Reading and writing end_info data");
|
||||||
@@ -1408,7 +1436,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
|
|
||||||
pngtest_check_text_support(read_ptr, text_ptr, num_text);
|
pngtest_check_text_support(read_ptr, text_ptr, num_text);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose != 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -1451,7 +1479,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
int num_unknowns = png_get_unknown_chunks(read_ptr, end_info_ptr,
|
int num_unknowns = png_get_unknown_chunks(read_ptr, end_info_ptr,
|
||||||
&unknowns);
|
&unknowns);
|
||||||
|
|
||||||
if (num_unknowns)
|
if (num_unknowns != 0)
|
||||||
{
|
{
|
||||||
png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns,
|
png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns,
|
||||||
num_unknowns);
|
num_unknowns);
|
||||||
@@ -1492,7 +1520,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_EASY_ACCESS_SUPPORTED
|
#ifdef PNG_EASY_ACCESS_SUPPORTED
|
||||||
if (verbose)
|
if (verbose != 0)
|
||||||
{
|
{
|
||||||
png_uint_32 iwidth, iheight;
|
png_uint_32 iwidth, iheight;
|
||||||
iwidth = png_get_image_width(write_ptr, write_info_ptr);
|
iwidth = png_get_image_width(write_ptr, write_info_ptr);
|
||||||
@@ -1570,15 +1598,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_WRITE_SUPPORTED /* else nothing was written */
|
#ifdef PNG_WRITE_SUPPORTED /* else nothing was written */
|
||||||
|
if (interlace_preserved != 0) /* else the files will be changed */
|
||||||
{
|
{
|
||||||
int wrote_question = 0;
|
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
static int wrote_question = 0;
|
||||||
png_size_t num_in, num_out;
|
png_size_t num_in, num_out;
|
||||||
char inbuf[256], outbuf[256];
|
char inbuf[256], outbuf[256];
|
||||||
|
|
||||||
|
|
||||||
num_in = fread(inbuf, 1, sizeof inbuf, fpin);
|
num_in = fread(inbuf, 1, sizeof inbuf, fpin);
|
||||||
num_out = fread(outbuf, 1, sizeof outbuf, fpout);
|
num_out = fread(outbuf, 1, sizeof outbuf, fpout);
|
||||||
|
|
||||||
@@ -1610,7 +1637,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!num_in)
|
if (num_in == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (memcmp(inbuf, outbuf, num_in))
|
if (memcmp(inbuf, outbuf, num_in))
|
||||||
@@ -1767,7 +1794,7 @@ main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (multiple)
|
if (multiple != 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
|
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
|
||||||
@@ -1957,9 +1984,10 @@ main(void)
|
|||||||
{
|
{
|
||||||
fprintf(STDERR,
|
fprintf(STDERR,
|
||||||
" test ignored because libpng was not built with read support\n");
|
" test ignored because libpng was not built with read support\n");
|
||||||
return 0;
|
/* And skip this test */
|
||||||
|
return PNG_LIBPNG_VER < 10600 ? 0 : 77;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_5_16 Your_png_h_is_not_version_1_5_16;
|
typedef png_libpng_version_1_5_21 Your_png_h_is_not_version_1_5_21;
|
||||||
|
|||||||
12
pngtrans.c
12
pngtrans.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.11 [June 14, 2012]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -452,7 +452,7 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
|
|||||||
{
|
{
|
||||||
if (row_info->bit_depth == 8)
|
if (row_info->bit_depth == 8)
|
||||||
{
|
{
|
||||||
if (at_start) /* Skip initial filler */
|
if (at_start != 0) /* Skip initial filler */
|
||||||
++sp;
|
++sp;
|
||||||
else /* Skip initial channel and, for sp, the filler */
|
else /* Skip initial channel and, for sp, the filler */
|
||||||
sp += 2, ++dp;
|
sp += 2, ++dp;
|
||||||
@@ -466,7 +466,7 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
|
|||||||
|
|
||||||
else if (row_info->bit_depth == 16)
|
else if (row_info->bit_depth == 16)
|
||||||
{
|
{
|
||||||
if (at_start) /* Skip initial filler */
|
if (at_start != 0) /* Skip initial filler */
|
||||||
sp += 2;
|
sp += 2;
|
||||||
else /* Skip initial channel and, for sp, the filler */
|
else /* Skip initial channel and, for sp, the filler */
|
||||||
sp += 4, dp += 2;
|
sp += 4, dp += 2;
|
||||||
@@ -492,7 +492,7 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
|
|||||||
{
|
{
|
||||||
if (row_info->bit_depth == 8)
|
if (row_info->bit_depth == 8)
|
||||||
{
|
{
|
||||||
if (at_start) /* Skip initial filler */
|
if (at_start != 0) /* Skip initial filler */
|
||||||
++sp;
|
++sp;
|
||||||
else /* Skip initial channels and, for sp, the filler */
|
else /* Skip initial channels and, for sp, the filler */
|
||||||
sp += 4, dp += 3;
|
sp += 4, dp += 3;
|
||||||
@@ -506,7 +506,7 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
|
|||||||
|
|
||||||
else if (row_info->bit_depth == 16)
|
else if (row_info->bit_depth == 16)
|
||||||
{
|
{
|
||||||
if (at_start) /* Skip initial filler */
|
if (at_start != 0) /* Skip initial filler */
|
||||||
sp += 2;
|
sp += 2;
|
||||||
else /* Skip initial channels and, for sp, the filler */
|
else /* Skip initial channels and, for sp, the filler */
|
||||||
sp += 8, dp += 6;
|
sp += 8, dp += 6;
|
||||||
|
|||||||
6
pngwio.c
6
pngwio.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngwio.c - functions for data output
|
/* pngwio.c - functions for data output
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.0 [January 6, 2011]
|
* Last changed in libpng 1.5.18 [February 6, 2014]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -207,6 +207,8 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
|
|||||||
# else
|
# else
|
||||||
png_ptr->output_flush_fn = output_flush_fn;
|
png_ptr->output_flush_fn = output_flush_fn;
|
||||||
# endif
|
# endif
|
||||||
|
#else
|
||||||
|
PNG_UNUSED(output_flush_fn)
|
||||||
#endif /* PNG_WRITE_FLUSH_SUPPORTED */
|
#endif /* PNG_WRITE_FLUSH_SUPPORTED */
|
||||||
|
|
||||||
/* It is an error to read while writing a png file */
|
/* It is an error to read while writing a png file */
|
||||||
|
|||||||
34
pngwrite.c
34
pngwrite.c
@@ -223,11 +223,14 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->text[i].lang,
|
info_ptr->text[i].lang,
|
||||||
info_ptr->text[i].lang_key,
|
info_ptr->text[i].lang_key,
|
||||||
info_ptr->text[i].text);
|
info_ptr->text[i].text);
|
||||||
|
/* Mark this chunk as written */
|
||||||
|
if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
|
||||||
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
||||||
|
else
|
||||||
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write international text");
|
png_warning(png_ptr, "Unable to write international text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we want a compressed text chunk */
|
/* If we want a compressed text chunk */
|
||||||
@@ -238,11 +241,11 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
png_write_zTXt(png_ptr, info_ptr->text[i].key,
|
png_write_zTXt(png_ptr, info_ptr->text[i].key,
|
||||||
info_ptr->text[i].text, 0,
|
info_ptr->text[i].text, 0,
|
||||||
info_ptr->text[i].compression);
|
info_ptr->text[i].compression);
|
||||||
|
/* Mark this chunk as written */
|
||||||
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write compressed text");
|
png_warning(png_ptr, "Unable to write compressed text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
|
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
|
||||||
@@ -340,11 +343,11 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
info_ptr->text[i].lang,
|
info_ptr->text[i].lang,
|
||||||
info_ptr->text[i].lang_key,
|
info_ptr->text[i].lang_key,
|
||||||
info_ptr->text[i].text);
|
info_ptr->text[i].text);
|
||||||
|
/* Mark this chunk as written */
|
||||||
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write international text");
|
png_warning(png_ptr, "Unable to write international text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt)
|
else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt)
|
||||||
@@ -354,11 +357,11 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
png_write_zTXt(png_ptr, info_ptr->text[i].key,
|
png_write_zTXt(png_ptr, info_ptr->text[i].key,
|
||||||
info_ptr->text[i].text, 0,
|
info_ptr->text[i].text, 0,
|
||||||
info_ptr->text[i].compression);
|
info_ptr->text[i].compression);
|
||||||
|
/* Mark this chunk as written */
|
||||||
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write compressed text");
|
png_warning(png_ptr, "Unable to write compressed text");
|
||||||
#endif
|
#endif
|
||||||
/* Mark this chunk as written */
|
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
|
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
|
||||||
@@ -367,12 +370,11 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
/* Write uncompressed chunk */
|
/* Write uncompressed chunk */
|
||||||
png_write_tEXt(png_ptr, info_ptr->text[i].key,
|
png_write_tEXt(png_ptr, info_ptr->text[i].key,
|
||||||
info_ptr->text[i].text, 0);
|
info_ptr->text[i].text, 0);
|
||||||
|
/* Mark this chunk as written */
|
||||||
|
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
||||||
#else
|
#else
|
||||||
png_warning(png_ptr, "Unable to write uncompressed text");
|
png_warning(png_ptr, "Unable to write uncompressed text");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Mark this chunk as written */
|
|
||||||
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -521,7 +523,7 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
/* Initialize zbuf - compression buffer */
|
/* Initialize zbuf - compression buffer */
|
||||||
png_ptr->zbuf_size = PNG_ZBUF_SIZE;
|
png_ptr->zbuf_size = PNG_ZBUF_SIZE;
|
||||||
|
|
||||||
if (!png_cleanup_needed)
|
if (png_cleanup_needed == 0)
|
||||||
{
|
{
|
||||||
png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr,
|
png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr,
|
||||||
png_ptr->zbuf_size);
|
png_ptr->zbuf_size);
|
||||||
@@ -529,7 +531,7 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
|
|||||||
png_cleanup_needed = 1;
|
png_cleanup_needed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_cleanup_needed)
|
if (png_cleanup_needed != 0)
|
||||||
{
|
{
|
||||||
/* Clean up PNG structure and deallocate any memory. */
|
/* Clean up PNG structure and deallocate any memory. */
|
||||||
png_free(png_ptr, png_ptr->zbuf);
|
png_free(png_ptr, png_ptr->zbuf);
|
||||||
@@ -765,7 +767,7 @@ png_write_row(png_structp png_ptr, png_const_bytep row)
|
|||||||
{
|
{
|
||||||
png_do_write_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass);
|
png_do_write_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass);
|
||||||
/* This should always get caught above, but still ... */
|
/* This should always get caught above, but still ... */
|
||||||
if (!(row_info.width))
|
if (row_info.width == 0)
|
||||||
{
|
{
|
||||||
png_write_finish_row(png_ptr);
|
png_write_finish_row(png_ptr);
|
||||||
return;
|
return;
|
||||||
@@ -865,7 +867,7 @@ png_write_flush(png_structp png_ptr)
|
|||||||
png_error(png_ptr, "zlib error");
|
png_error(png_ptr, "zlib error");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(png_ptr->zstream.avail_out))
|
if ((png_ptr->zstream.avail_out) == 0)
|
||||||
{
|
{
|
||||||
/* Write the IDAT and reset the zlib output buffer */
|
/* Write the IDAT and reset the zlib output buffer */
|
||||||
png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
|
png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
|
||||||
|
|||||||
16
pngwutil.c
16
pngwutil.c
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngwutil.c - utilities to write a PNG file
|
/* pngwutil.c - utilities to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.14 [January 24, 2013]
|
* Last changed in libpng 1.5.19 [August 21, 2014]
|
||||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@@ -315,6 +315,7 @@ png_zlib_release(png_structp png_ptr)
|
|||||||
|
|
||||||
if (ret != Z_OK)
|
if (ret != Z_OK)
|
||||||
{
|
{
|
||||||
|
#ifdef PNG_WARNINGS_SUPPORTED
|
||||||
png_const_charp err;
|
png_const_charp err;
|
||||||
PNG_WARNING_PARAMETERS(p)
|
PNG_WARNING_PARAMETERS(p)
|
||||||
|
|
||||||
@@ -349,6 +350,7 @@ png_zlib_release(png_structp png_ptr)
|
|||||||
|
|
||||||
png_formatted_warning(png_ptr, p,
|
png_formatted_warning(png_ptr, p,
|
||||||
"zlib failed to reset compressor: @1(@2): @3");
|
"zlib failed to reset compressor: @1(@2): @3");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -823,7 +825,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
|
|||||||
png_ptr->zstream.zfree = png_zfree;
|
png_ptr->zstream.zfree = png_zfree;
|
||||||
png_ptr->zstream.opaque = (voidpf)png_ptr;
|
png_ptr->zstream.opaque = (voidpf)png_ptr;
|
||||||
|
|
||||||
if (!(png_ptr->do_filter))
|
if ((png_ptr->do_filter) == PNG_NO_FILTERS)
|
||||||
{
|
{
|
||||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
|
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
|
||||||
png_ptr->bit_depth < 8)
|
png_ptr->bit_depth < 8)
|
||||||
@@ -1147,7 +1149,7 @@ png_write_iCCP(png_structp png_ptr, png_const_charp name, int compression_type,
|
|||||||
profile_len = embedded_profile_len;
|
profile_len = embedded_profile_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile_len)
|
if (profile_len != 0)
|
||||||
profile_len = png_text_compress(png_ptr, profile,
|
profile_len = png_text_compress(png_ptr, profile,
|
||||||
(png_size_t)profile_len, PNG_COMPRESSION_TYPE_BASE, &comp);
|
(png_size_t)profile_len, PNG_COMPRESSION_TYPE_BASE, &comp);
|
||||||
|
|
||||||
@@ -1160,7 +1162,7 @@ png_write_iCCP(png_structp png_ptr, png_const_charp name, int compression_type,
|
|||||||
png_write_chunk_data(png_ptr, (png_bytep)new_name,
|
png_write_chunk_data(png_ptr, (png_bytep)new_name,
|
||||||
(png_size_t)(name_len + 2));
|
(png_size_t)(name_len + 2));
|
||||||
|
|
||||||
if (profile_len)
|
if (profile_len != 0)
|
||||||
{
|
{
|
||||||
png_write_compressed_data_out(png_ptr, &comp, profile_len);
|
png_write_compressed_data_out(png_ptr, &comp, profile_len);
|
||||||
}
|
}
|
||||||
@@ -1618,7 +1620,7 @@ png_check_keyword(png_structp png_ptr, png_const_charp key, png_charpp new_key)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
*dp = '\0';
|
*dp = '\0';
|
||||||
if (kwarn)
|
if (kwarn != 0)
|
||||||
png_warning(png_ptr, "extra interior spaces removed from keyword");
|
png_warning(png_ptr, "extra interior spaces removed from keyword");
|
||||||
|
|
||||||
if (key_len == 0)
|
if (key_len == 0)
|
||||||
@@ -1670,7 +1672,7 @@ png_write_tEXt(png_structp png_ptr, png_const_charp key, png_const_charp text,
|
|||||||
png_write_chunk_data(png_ptr, (png_bytep)new_key,
|
png_write_chunk_data(png_ptr, (png_bytep)new_key,
|
||||||
(png_size_t)(key_len + 1));
|
(png_size_t)(key_len + 1));
|
||||||
|
|
||||||
if (text_len)
|
if (text_len != 0)
|
||||||
png_write_chunk_data(png_ptr, (png_const_bytep)text,
|
png_write_chunk_data(png_ptr, (png_const_bytep)text,
|
||||||
(png_size_t)text_len);
|
(png_size_t)text_len);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
VisualStudio instructions
|
VisualStudio instructions
|
||||||
|
|
||||||
libpng version 1.5.16 - May 23, 2013
|
libpng version 1.5.21 - December 22, 2014
|
||||||
|
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* zlib.props - location of zlib source
|
* zlib.props - location of zlib source
|
||||||
*
|
*
|
||||||
* libpng version 1.5.16 - May 23, 2013
|
* libpng version 1.5.21 - December 22, 2014
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
Makefiles for libpng version 1.5.16 - May 23, 2013
|
Makefiles for libpng version 1.5.21 - December 22, 2014
|
||||||
|
|
||||||
pnglibconf.h.prebuilt => Stores configuration settings
|
pnglibconf.h.prebuilt => Stores configuration settings
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng15.so.15.1.5.16)
|
(gcc, creates libpng15.so.15.1.5.21)
|
||||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||||
ansi2knr (Requires ansi2knr.c from
|
ansi2knr (Requires ansi2knr.c from
|
||||||
@@ -20,8 +20,6 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
|||||||
makefile.darwin => Darwin makefile, can use on MacosX
|
makefile.darwin => Darwin makefile, can use on MacosX
|
||||||
makefile.dec => DEC Alpha UNIX makefile
|
makefile.dec => DEC Alpha UNIX makefile
|
||||||
makefile.dj2 => DJGPP 2 makefile
|
makefile.dj2 => DJGPP 2 makefile
|
||||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
|
||||||
(gcc, creates libpng15.so.15.1.5.16)
|
|
||||||
makefile.freebsd => FreeBSD makefile
|
makefile.freebsd => FreeBSD makefile
|
||||||
makefile.gcc => Generic gcc makefile
|
makefile.gcc => Generic gcc makefile
|
||||||
makefile.hpgcc => HPUX makefile using gcc
|
makefile.hpgcc => HPUX makefile using gcc
|
||||||
@@ -36,12 +34,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
|||||||
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
||||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
makefile.sggcc => Silicon Graphics (gcc,
|
makefile.sggcc => Silicon Graphics (gcc,
|
||||||
creates libpng15.so.15.1.5.16)
|
creates libpng15.so.15.1.5.21)
|
||||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||||
creates libpng15.so.15.1.5.16)
|
creates libpng15.so.15.1.5.21)
|
||||||
makefile.so9 => Solaris 9 makefile (gcc,
|
makefile.so9 => Solaris 9 makefile (gcc,
|
||||||
creates libpng15.so.15.1.5.16)
|
creates libpng15.so.15.1.5.21)
|
||||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||||
makefile.sunos => Sun makefile
|
makefile.sunos => Sun makefile
|
||||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* def.dfn - define format of libpng.def
|
/* def.c - define format of libpng.def
|
||||||
*
|
*
|
||||||
* Last changed in libpng version 1.5.7 [December 15, 2011]
|
* Last changed in libpng version 1.6.16 [December 22, 2014]
|
||||||
* Copyright (c) 2010-2011 Glenn Randers-Pehrson
|
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -21,9 +21,9 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
|
|||||||
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
|
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
|
||||||
PNG_DFN ""
|
PNG_DFN ""
|
||||||
PNG_DFN "EXPORTS"
|
PNG_DFN "EXPORTS"
|
||||||
PNG_DFN ";Version 1.5.0beta58"
|
PNG_DFN ";Version 1.5.21"
|
||||||
|
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
||||||
|
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
20
scripts/dfn.awk
Normal file → Executable file
20
scripts/dfn.awk
Normal file → Executable file
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/awk -f
|
#!/bin/awk -f
|
||||||
# scripts/dfn.awk - process a .dfn file
|
# scripts/dfn.awk - process a .dfn file
|
||||||
#
|
#
|
||||||
# last changed in libpng version 1.5.14 - February 4, 2013
|
# last changed in libpng version 1.5.19 - August 21, 2014
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013-2013 Glenn Randers-Pehrson
|
# Copyright (c) 2013-2014 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -25,7 +25,7 @@ BEGIN{
|
|||||||
# The output file must be specified before any input:
|
# The output file must be specified before any input:
|
||||||
NR==1 && out == "/dev/null" {
|
NR==1 && out == "/dev/null" {
|
||||||
print "out=output.file must be given on the command line"
|
print "out=output.file must be given on the command line"
|
||||||
# but continue without setting the error code, this allows the
|
# but continue without setting the error code; this allows the
|
||||||
# script to be checked easily
|
# script to be checked easily
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,14 +61,14 @@ $1 ~ /^PNG_DFN_END_SORT/{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/^[^"]*PNG_DFN *".*"[^"]*$/{
|
/^[^"]*PNG_DFN *".*"[^"]*$/{
|
||||||
# A definition line, apparently correctly formated, extract the
|
# A definition line, apparently correctly formatted; extract the
|
||||||
# definition then replace any doubled "" that remain with a single
|
# definition then replace any doubled "" that remain with a single
|
||||||
# double quote. Notice that the original doubled double quotes
|
# double quote. Notice that the original doubled double quotes
|
||||||
# may have been split by tokenization
|
# may have been split by tokenization
|
||||||
#
|
#
|
||||||
# Sometimes GCC splits the PNG_DFN lines, we know this has happened
|
# Sometimes GCC splits the PNG_DFN lines; we know this has happened
|
||||||
# if the quotes aren't closed and must read another line. In this
|
# if the quotes aren't closed and must read another line. In this
|
||||||
# case it is essential to reject lines that start '#' because those
|
# case it is essential to reject lines that start with '#' because those
|
||||||
# are introduced #line directives.
|
# are introduced #line directives.
|
||||||
orig=$0
|
orig=$0
|
||||||
line=$0
|
line=$0
|
||||||
@@ -126,13 +126,13 @@ $1 ~ /^PNG_DFN_END_SORT/{
|
|||||||
else while (1) {
|
else while (1) {
|
||||||
if (getline nextline) {
|
if (getline nextline) {
|
||||||
# If the line starts with '#' it is a preprocesor line directive
|
# If the line starts with '#' it is a preprocesor line directive
|
||||||
# from cc -E, skip it:
|
# from cc -E; skip it:
|
||||||
if (nextline !~ /^#/) {
|
if (nextline !~ /^#/) {
|
||||||
line = line " " nextline
|
line = line " " nextline
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# This is end-of-input - probably a missig "@ on the first line:
|
# This is end-of-input - probably a missing "@ on the first line:
|
||||||
print "line", lineno ": unbalanced @\" ... \"@ pair"
|
print "line", lineno ": unbalanced @\" ... \"@ pair"
|
||||||
err=1
|
err=1
|
||||||
next
|
next
|
||||||
@@ -144,7 +144,7 @@ $1 ~ /^PNG_DFN_END_SORT/{
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Attempt to remove a trailing " (not preceded by '@') - if this can
|
# Attempt to remove a trailing " (not preceded by '@') - if this can
|
||||||
# be done stop now, if not assume a split line again
|
# be done, stop now; if not assume a split line again
|
||||||
if (sub(/"[^"]*$/, "", line))
|
if (sub(/"[^"]*$/, "", line))
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ $1 ~ /^PNG_DFN_END_SORT/{
|
|||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
/PNG_DFN/{
|
/PNG_DFN/{
|
||||||
print "line", NR, "incorrectly formatted PNG_DFN line:"
|
print "line", NR, "incorrectly formatted PNG_DFN line:"
|
||||||
print $0
|
print $0
|
||||||
err = 1
|
err = 1
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
# Modeled after libxml-config.
|
# Modeled after libxml-config.
|
||||||
|
|
||||||
version=1.5.16
|
version=1.5.21
|
||||||
prefix=""
|
prefix=""
|
||||||
libdir=""
|
libdir=""
|
||||||
libs=""
|
libs=""
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng15
|
|||||||
|
|
||||||
Name: libpng
|
Name: libpng
|
||||||
Description: Loads and saves PNG files
|
Description: Loads and saves PNG files
|
||||||
Version: 1.5.16
|
Version: 1.5.21
|
||||||
Libs: -L${libdir} -lpng15
|
Libs: -L${libdir} -lpng15
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on Solaris 2.x with cc
|
# makefile for libpng on Solaris 2.x with cc
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
|
|
||||||
@@ -45,8 +45,8 @@ ZLIBINC=/usr/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=$(SUN_CC_FLAGS) # $(WARNMORE) -g
|
||||||
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@@ -77,8 +77,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@@ -104,8 +107,8 @@ libpng-config:
|
|||||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||||
echo R_opts=\"-R$(LIBPATH)\"; \
|
echo R_opts=\"-R$(LIBPATH)\"; \
|
||||||
echo ccopts=\"-xtarget=ultra\"; \
|
echo ccopts=\"-fast -xtarget=ultra\"; \
|
||||||
echo ldopts=\"-xtarget=ultra\"; \
|
echo ldopts=\"-fast -xtarget=ultra\"; \
|
||||||
echo libs=\"-lpng15 -lz -lm\"; \
|
echo libs=\"-lpng15 -lz -lm\"; \
|
||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
@@ -196,7 +199,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
@@ -205,7 +208,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on Solaris 2.x with cc
|
# makefile for libpng on Solaris 2.x with cc
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
|
|
||||||
@@ -45,8 +45,8 @@ ZLIBINC=/usr/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS= $(SUN_CC_FLAGS) # $(WARNMORE) -g
|
||||||
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng15 -lz -lm
|
LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@@ -77,8 +77,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@@ -104,8 +107,8 @@ libpng-config:
|
|||||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||||
echo R_opts=\"-R$(LIBPATH)\"; \
|
echo R_opts=\"-R$(LIBPATH)\"; \
|
||||||
echo ccopts=\"-xtarget=ultra -xarch=v9\"; \
|
echo ccopts=\"-fast -xtarget=ultra -xarch=v9\"; \
|
||||||
echo ldopts=\"-xtarget=ultra -xarch=v9\"; \
|
echo ldopts=\"-fast -xtarget=ultra -xarch=v9\"; \
|
||||||
echo libs=\"-lpng15 -lz -lm\"; \
|
echo libs=\"-lpng15 -lz -lm\"; \
|
||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
chmod +x libpng-config
|
chmod +x libpng-config
|
||||||
@@ -196,7 +199,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
@@ -205,7 +208,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
|
$(CC) $(SUN_CC_FLAGS) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng using gcc (generic, static library)
|
# makefile for libpng using gcc (generic, static library)
|
||||||
# Copyright (C) 2002, 2006-2009 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006-2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
@@ -21,7 +21,7 @@ RANLIB = ranlib
|
|||||||
RM_F = rm -f
|
RM_F = rm -f
|
||||||
LN_SF = ln -f -s
|
LN_SF = ln -f -s
|
||||||
|
|
||||||
LIBNAME=libpng15
|
LIBNAME = libpng15
|
||||||
PNGMAJ = 15
|
PNGMAJ = 15
|
||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
@@ -41,42 +41,37 @@ DESTDIR=
|
|||||||
DI=$(DESTDIR)$(INCPATH)
|
DI=$(DESTDIR)$(INCPATH)
|
||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
|
|
||||||
CDEBUG = -g -DPNG_DEBUG=5
|
WARNMORE =
|
||||||
LDDEBUG =
|
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CRELEASE = -O2
|
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
|
||||||
LDRELEASE = -s
|
LDFLAGS = -L. -L$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
WARNMORE=-W -Wall
|
|
||||||
CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
|
|
||||||
LDFLAGS = -L. -L$(ZLIBLIB) -lpng15 -lz -lm $(LDRELEASE)
|
|
||||||
|
|
||||||
# File extensions
|
|
||||||
O=.o
|
|
||||||
A=.a
|
|
||||||
E=
|
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
||||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
all: $(LIBNAME)$(A) pngtest$(E)
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
all: $(LIBNAME).a pngtest$(E)
|
||||||
|
|
||||||
include scripts/pnglibconf.mak
|
include scripts/pnglibconf.mak
|
||||||
REMOVE = $(RM_F)
|
REMOVE = $(RM_F)
|
||||||
DFNFLAGS = $(DEFS) $(CPPFLAGS)
|
DFNFLAGS = $(DEFS) $(CPPFLAGS)
|
||||||
|
|
||||||
$(LIBNAME)$(A): $(OBJS)
|
$(LIBNAME).a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
test: pngtest$(E)
|
test: pngtest$(E)
|
||||||
./pngtest$(E)
|
./pngtest$(E)
|
||||||
|
|
||||||
pngtest$(E): pngtest$(O) $(LIBNAME)$(A)
|
pngtest$(E): pngtest.o $(LIBNAME).a
|
||||||
$(LD) -o $@ pngtest$(O) $(LDFLAGS)
|
$(LD) -o $@ pngtest.o $(LDFLAGS)
|
||||||
|
|
||||||
install: $(LIBNAME)$(A)
|
install: $(LIBNAME).a
|
||||||
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||||
@@ -92,30 +87,30 @@ install: $(LIBNAME)$(A)
|
|||||||
$(DI)/$(LIBNAME)/pnglibconf.h
|
$(DI)/$(LIBNAME)/pnglibconf.h
|
||||||
-@$(RM_F) -r $(DI)/libpng
|
-@$(RM_F) -r $(DI)/libpng
|
||||||
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
||||||
-@$(RM_F) $(DL)/$(LIBNAME)$(A)
|
-@$(RM_F) $(DL)/$(LIBNAME).a
|
||||||
-@$(RM_F) $(DL)/libpng$(A)
|
-@$(RM_F) $(DL)/libpng.a
|
||||||
cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
|
cp $(LIBNAME).a $(DL)/$(LIBNAME).a
|
||||||
chmod 644 $(DL)/$(LIBNAME)$(A)
|
chmod 644 $(DL)/$(LIBNAME).a
|
||||||
(cd $(DL); $(LN_SF) $(LIBNAME)$(A) libpng$(A))
|
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
||||||
(cd $(DI); $(LN_SF) libpng/* .;)
|
(cd $(DI); $(LN_SF) libpng/* .;)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png pnglibconf.h
|
$(RM_F) *.o $(LIBNAME).a pngtest pngout.png pnglibconf.h
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest.o: png.h pngconf.h pnglibconf.h
|
||||||
|
|||||||
@@ -24,13 +24,15 @@ LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib
|
|||||||
LN= slink
|
LN= slink
|
||||||
# file deletion command
|
# file deletion command
|
||||||
RM= delete quiet
|
RM= delete quiet
|
||||||
# file copy command?
|
|
||||||
CP= copy
|
|
||||||
# library (.lib) file creation command
|
# library (.lib) file creation command
|
||||||
AR= oml
|
AR= oml
|
||||||
# make directory command
|
# make directory command
|
||||||
MKDIR= makedir
|
MKDIR= makedir
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -43,8 +45,8 @@ $(AR) libpng.lib r $(OBJS)
|
|||||||
|
|
||||||
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
|
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
|
||||||
|
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
$(CP) scripts/pnglibconf.h.prebuilt pnglibconf.h
|
COPY $(PNGLIBCONF_H_PREBUILT) TO pnglibconf.h
|
||||||
|
|
||||||
pngtest: pngtest.o libpng.lib
|
pngtest: pngtest.o libpng.lib
|
||||||
$(LN) <WITH <
|
$(LN) <WITH <
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2002 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -9,9 +9,10 @@
|
|||||||
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
|
# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
|
||||||
# rules for library management
|
# rules for library management
|
||||||
#
|
#
|
||||||
CFLAGS=-I..\zlib -O
|
CPPFLAGS = -I..\zlib
|
||||||
|
CFLAGS = -O
|
||||||
LBR = png.lib
|
LBR = png.lib
|
||||||
LDFLAGS=-lpng -lz -lm
|
LDFLAGS = -L. -L..\zlib -lpng -lz -lm
|
||||||
|
|
||||||
# where make install puts libpng.a and png.h
|
# where make install puts libpng.a and png.h
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
@@ -28,6 +29,10 @@ LIBPATH=$(prefix)/lib
|
|||||||
# you execute make install.
|
# you execute make install.
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
|
OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
|
||||||
$(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
|
$(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
|
||||||
$(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
|
$(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
|
||||||
@@ -36,12 +41,15 @@ OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
|
|||||||
|
|
||||||
all: $(LBR) pngtest.ttp
|
all: $(LBR) pngtest.ttp
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
$(LBR): $(OBJS)
|
$(LBR): $(OBJS)
|
||||||
|
|
||||||
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
|
$(OBJS): pngpriv.h png.h pngconf.h pnglibconf.h pnginfo.h pngstruct.h pngdebug.h
|
||||||
|
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
cp scripts/pnglibconf.h.prebuilt pnglibconf.h
|
cp $< $@
|
||||||
|
|
||||||
pngtest.ttp: pngtest.o $(LBR)
|
pngtest.ttp: pngtest.o $(LBR)
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
|
$(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
|
||||||
|
|||||||
@@ -11,10 +11,11 @@
|
|||||||
## Where zlib.h, zconf.h and zlib.lib are
|
## Where zlib.h, zconf.h and zlib.lib are
|
||||||
ZLIB_DIR=..\zlib
|
ZLIB_DIR=..\zlib
|
||||||
|
|
||||||
## Compiler, linker and lib stuff
|
## Compiler, linker, librarian and other tools
|
||||||
CC=bcc32
|
CC=bcc32
|
||||||
LD=bcc32
|
LD=bcc32
|
||||||
LIB=tlib
|
LIB=tlib
|
||||||
|
CP=copy
|
||||||
|
|
||||||
# -3 = 386, -4 = 486, -5 = Pentium etc.
|
# -3 = 386, -4 = 486, -5 = Pentium etc.
|
||||||
!ifndef TARGET_CPU
|
!ifndef TARGET_CPU
|
||||||
@@ -43,11 +44,18 @@ LDEBUG=$(LDEBUG) -N
|
|||||||
# -d merge duplicate strings
|
# -d merge duplicate strings
|
||||||
# -k- turn off standard stack frame
|
# -k- turn off standard stack frame
|
||||||
# -w display all warnings
|
# -w display all warnings
|
||||||
CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
|
CPPFLAGS=-I$(ZLIB_DIR)
|
||||||
|
CFLAGS=-O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
|
||||||
|
|
||||||
# -M generate map file
|
# -M generate map file
|
||||||
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
|
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts\pnglibconf.mak for more options
|
||||||
|
!ifndef PNGLIBCONF_H_PREBUILT
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
|
||||||
|
!endif
|
||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
OBJS = \
|
OBJS = \
|
||||||
png.obj \
|
png.obj \
|
||||||
@@ -89,10 +97,11 @@ LIBNAME=libpng.lib
|
|||||||
# Braces let make "batch" calls to the compiler,
|
# Braces let make "batch" calls to the compiler,
|
||||||
# 2 calls instead of 12; space is important.
|
# 2 calls instead of 12; space is important.
|
||||||
.c.obj:
|
.c.obj:
|
||||||
$(CC) $(CFLAGS) -c {$*.c }
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
|
||||||
|
|
||||||
.c.exe:
|
.c.exe:
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
|
||||||
|
$(LIBNAME) zlib.lib $(NOEHLIB)
|
||||||
|
|
||||||
.obj.exe:
|
.obj.exe:
|
||||||
$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
|
$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
|
||||||
@@ -109,10 +118,8 @@ test: pngtest.exe
|
|||||||
|
|
||||||
## Minor Targets
|
## Minor Targets
|
||||||
|
|
||||||
# see scripts\pnglibconf.mak for how to make this file
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
# with different options
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
pnglibconf.h: scripts\pnglibconf.h.prebuilt
|
|
||||||
copy scripts\pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng on BeOS x86 ELF with gcc
|
# makefile for libpng on BeOS x86 ELF with gcc
|
||||||
# modified from makefile.linux by Sander Stoks
|
# modified from makefile.linux by Sander Stoks
|
||||||
# Copyright (C) 2002, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1999 Greg Roelofs
|
# Copyright (C) 1999 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@@ -24,6 +24,7 @@ AR_RC=ar rc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -sf
|
LN_SF=ln -sf
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# Where the zlib library and include files are located
|
# Where the zlib library and include files are located
|
||||||
@@ -40,8 +41,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
|
||||||
# still here in R4.5
|
# still here in R4.5
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=-W -Wall -O1 -funroll-loops $(ALIGN) # $(WARNMORE) -g
|
||||||
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
|
||||||
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
|
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
|
||||||
|
|
||||||
@@ -68,6 +69,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -76,11 +81,13 @@ OBJSDLL = $(OBJS)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# try include scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -176,14 +183,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) $(CFLAGS) \
|
$(CC) -I$(DI) $(CPPFLAGS) $(CFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
|
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
|||||||
@@ -12,10 +12,11 @@
|
|||||||
## Where zlib.h, zconf.h and zlib_MODEL.lib are
|
## Where zlib.h, zconf.h and zlib_MODEL.lib are
|
||||||
ZLIB_DIR=..\zlib
|
ZLIB_DIR=..\zlib
|
||||||
|
|
||||||
## Compiler, linker and lib stuff
|
## Compiler, linker, librarian and other tools
|
||||||
CC=bcc
|
CC=bcc
|
||||||
LD=bcc
|
LD=bcc
|
||||||
LIB=tlib
|
LIB=tlib
|
||||||
|
CP=copy
|
||||||
|
|
||||||
!ifndef MODEL
|
!ifndef MODEL
|
||||||
MODEL=l
|
MODEL=l
|
||||||
@@ -51,11 +52,18 @@ LDEBUG=$(LDEBUG) -N
|
|||||||
# -w set all warnings on
|
# -w set all warnings on
|
||||||
# -O2 optimize for speed
|
# -O2 optimize for speed
|
||||||
# -Z global optimization
|
# -Z global optimization
|
||||||
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
|
CPPFLAGS=-I$(ZLIB_DIR)
|
||||||
|
CFLAGS=-O2 -Z -X- -w -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
|
||||||
|
|
||||||
# -M generate map file
|
# -M generate map file
|
||||||
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
|
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts\pnglibconf.mak for more options
|
||||||
|
!ifndef PNGLIBCONF_H_PREBUILT
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
|
||||||
|
!endif
|
||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
|
|
||||||
OBJS = \
|
OBJS = \
|
||||||
@@ -99,18 +107,19 @@ LIBNAME=libpng$(MODEL).lib
|
|||||||
# Braces let make "batch" calls to the compiler,
|
# Braces let make "batch" calls to the compiler,
|
||||||
# 2 calls instead of 12; space is important.
|
# 2 calls instead of 12; space is important.
|
||||||
.c.obj:
|
.c.obj:
|
||||||
$(CC) $(CFLAGS) -c {$*.c }
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
|
||||||
|
|
||||||
.c.exe:
|
.c.exe:
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
|
||||||
|
$(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
|
||||||
|
|
||||||
## Major targets
|
## Major targets
|
||||||
|
|
||||||
all: libpng pngtest
|
all: libpng pngtest
|
||||||
|
|
||||||
# try !inlude scripts\pnglibconf.mak for more options
|
# try !include scripts\pnglibconf.mak for more options
|
||||||
pnglibconf.h: scripts\pnglibconf.h.prebuilt
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
copy scripts\pnglibconf.h.prebuilt $@
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
|
|
||||||
libpng: $(LIBNAME)
|
libpng: $(LIBNAME)
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
VERMAJ = 1
|
VERMAJ = 1
|
||||||
VERMIN = 5
|
VERMIN = 5
|
||||||
VERMIC = 16
|
VERMIC = 21
|
||||||
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
||||||
NAME = libpng
|
NAME = libpng
|
||||||
PACKAGE = $(NAME)-$(VER)
|
PACKAGE = $(NAME)-$(VER)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Darwin / Mac OS X
|
# makefile for libpng on Darwin / Mac OS X
|
||||||
# Copyright (C) 2002, 2004, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2004, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2001 Christoph Pfisterer
|
# Copyright (C) 2001 Christoph Pfisterer
|
||||||
# derived from makefile.linux:
|
# derived from makefile.linux:
|
||||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||||
@@ -34,12 +34,13 @@ AR_RC=ar rc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -sf
|
LN_SF=ln -sf
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
ARCH=-arch ppc -arch i386 -arch x86_64
|
|
||||||
|
|
||||||
# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
|
CPPFLAGS=-I$(ZLIBINC)
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops $(ARCH)
|
# CFLAGS=-W -Wall -O3 -funroll-loops
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz $(ARCH)
|
CFLAGS=-W -Wall -O -funroll-loops
|
||||||
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(exec_prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
@@ -61,6 +62,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -69,14 +74,16 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fno-common -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -105,7 +112,7 @@ $(LIBSOMAJ): $(OBJSDLL)
|
|||||||
$(CC) -dynamiclib \
|
$(CC) -dynamiclib \
|
||||||
-install_name $(LIBPATH)/$(LIBSOMAJ) \
|
-install_name $(LIBPATH)/$(LIBSOMAJ) \
|
||||||
-current_version 15 -compatibility_version 15 \
|
-current_version 15 -compatibility_version 15 \
|
||||||
$(ARCH) -o $(LIBSOMAJ) \
|
-o $(LIBSOMAJ) \
|
||||||
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
$(OBJSDLL) -L$(ZLIBLIB) -lz
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBSO)
|
pngtest: pngtest.o $(LIBSO)
|
||||||
@@ -176,14 +183,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on DEC Alpha Unix
|
# makefile for libpng on DEC Alpha Unix
|
||||||
# Copyright (C) 2000-2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2000-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -22,6 +22,7 @@ CC=cc
|
|||||||
MKDIR_P=mkdir
|
MKDIR_P=mkdir
|
||||||
LN_SF=ln -f -s
|
LN_SF=ln -f -s
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# where make install puts libpng.a and png.h
|
# where make install puts libpng.a and png.h
|
||||||
@@ -53,18 +54,25 @@ DM=$(DESTDIR)$(MANPATH)
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS=-std -w1 -O # -g
|
||||||
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
|
all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -161,7 +169,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -w1 -I$(DI) -I$(ZLIBINC) \
|
$(CC) -w1 -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
@@ -170,14 +178,14 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -w1 -I$(ZLIBINC) \
|
$(CC) -w1 $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB) \
|
-L$(ZLIBLIB) -R$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtesti pngtest.png
|
./pngtesti pngtest.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
|
$(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
|
||||||
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
libpng-config $(LIBSO) $(LIBSOMAJ)* \
|
||||||
libpng.pc pnglibconf.h
|
libpng.pc pnglibconf.h
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# DJGPP (DOS gcc) makefile for libpng
|
# DJGPP (DOS gcc) makefile for libpng
|
||||||
# Copyright (C) 2002, 2006, 2009-2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -13,20 +13,30 @@ INCPATH=$(prefix)/include
|
|||||||
LIBPATH=$(prefix)/lib
|
LIBPATH=$(prefix)/lib
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS=-I../zlib -O -DPNG_NO_SNPRINTF
|
CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
|
||||||
|
CFLAGS=-O
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||||
|
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
|
||||||
|
CP=cp
|
||||||
|
RM_F=rm -f
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
|
||||||
pngmem.o pngerror.o pngpread.o
|
pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
ar rc $@ $(OBJS)
|
||||||
@@ -39,7 +49,7 @@ pngtest: pngtest.o libpng.a
|
|||||||
test: pngtest
|
test: pngtest
|
||||||
./pngtest
|
./pngtest
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o libpng.a pngtest pngout.png pnglibconf.h
|
$(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|
||||||
|
|||||||
@@ -1,263 +0,0 @@
|
|||||||
# makefile for libpng.a and libpng15.so on Linux ELF with gcc
|
|
||||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs
|
|
||||||
# and Glenn Randers-Pehrson
|
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
|
||||||
#
|
|
||||||
# This code is released under the libpng license.
|
|
||||||
# For conditions of distribution and use, see the disclaimer
|
|
||||||
# and license in png.h
|
|
||||||
|
|
||||||
# Modified for Debian by Junichi Uekawa and Josselin Mouette
|
|
||||||
# Major modifications are:
|
|
||||||
# * link libpng explicitly with libz and libm
|
|
||||||
# * $(OLDSO).15 is a symlink rather than a different library
|
|
||||||
# * versioned symbols
|
|
||||||
|
|
||||||
# Library name:
|
|
||||||
LIBNAME = libpng15
|
|
||||||
PNGMAJ = 15
|
|
||||||
|
|
||||||
# Shared library names:
|
|
||||||
LIBSO=$(LIBNAME).so
|
|
||||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
|
||||||
LIBSOREL=$(LIBSOMAJ).$(RELEASE)
|
|
||||||
OLDSO=libpng.so
|
|
||||||
OLDSOMAJ=libpng.so.15
|
|
||||||
|
|
||||||
# Utilities:
|
|
||||||
AR_RC=ar rc
|
|
||||||
CC=gcc
|
|
||||||
MKDIR_P=mkdir -p
|
|
||||||
LN_SF=ln -sf
|
|
||||||
RANLIB=ranlib
|
|
||||||
RM_F=/bin/rm -f
|
|
||||||
|
|
||||||
# where "make install" puts libpng15.a, libpng15.so*,
|
|
||||||
# libpng15/png.h, libpng15/pngconf.h, and libpng15/pnglibconf.h
|
|
||||||
# Prefix must be a full pathname.
|
|
||||||
prefix=/usr/local
|
|
||||||
exec_prefix=$(prefix)
|
|
||||||
|
|
||||||
# Where the zlib library and include files are located.
|
|
||||||
ZLIBLIB=/usr/local/lib
|
|
||||||
ZLIBINC=/usr/local/include
|
|
||||||
# ZLIBLIB=../zlib
|
|
||||||
# ZLIBINC=../zlib
|
|
||||||
|
|
||||||
ALIGN=
|
|
||||||
# for i386:
|
|
||||||
#ALIGN=-malign-loops=2 -malign-functions=2
|
|
||||||
|
|
||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
|
||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
|
||||||
|
|
||||||
CFLAGS=-W -Wall -D_REENTRANT -O2 \
|
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
|
||||||
|
|
||||||
LDFLAGS=-L. -lpng15
|
|
||||||
LDFLAGS_A=libpng.a -lz -lm
|
|
||||||
LIBADDFLAGS=-lz -lm
|
|
||||||
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
|
||||||
LIBPATH=$(exec_prefix)/lib
|
|
||||||
MANPATH=$(prefix)/man
|
|
||||||
BINPATH=$(exec_prefix)/bin
|
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
|
||||||
# installing into a temporary location. Example:
|
|
||||||
#
|
|
||||||
# make install DESTDIR=/tmp/build/libpng
|
|
||||||
#
|
|
||||||
# If you're going to install into a temporary location
|
|
||||||
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
|
|
||||||
# you execute make install.
|
|
||||||
DESTDIR=
|
|
||||||
|
|
||||||
DB=$(DESTDIR)$(BINPATH)
|
|
||||||
DI=$(DESTDIR)$(INCPATH)
|
|
||||||
DL=$(DESTDIR)$(LIBPATH)
|
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
|
||||||
|
|
||||||
OBJSDLL = $(OBJS:.o=.pic.o)
|
|
||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
|
||||||
|
|
||||||
.c.pic.o:
|
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
|
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
|
||||||
$(AR_RC) $@ $(OBJS)
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
libpng.pc:
|
|
||||||
cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
|
|
||||||
-e s!@exec_prefix@!$(exec_prefix)! \
|
|
||||||
-e s!@libdir@!$(LIBPATH)! \
|
|
||||||
-e s!@includedir@!$(INCPATH)! \
|
|
||||||
-e s!-lpng15!-lpng15\ -lz\ -lm! > libpng.pc
|
|
||||||
|
|
||||||
libpng.syms: png.h pngconf.h pnglibconf.h
|
|
||||||
$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
|
|
||||||
awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG15_%s {global:\n",PNGMAJ)}\
|
|
||||||
{ for (i=1;i+2<=NF;++i)\
|
|
||||||
if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
|
|
||||||
print $$(i+1) ";";\
|
|
||||||
for (i=1;i+1<=NF;++i)\
|
|
||||||
if ($$(i)=="PNG_DATA_EXPORT")\
|
|
||||||
print $$(i+1) ";";}\
|
|
||||||
END{print "local: *; };"}' >$@.new
|
|
||||||
$(RM_F) $@
|
|
||||||
mv $@.new $@
|
|
||||||
|
|
||||||
libpng-config:
|
|
||||||
( cat scripts/libpng-config-head.in; \
|
|
||||||
echo prefix=\"$(prefix)\"; \
|
|
||||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
|
||||||
echo L_opts=\"\"; \
|
|
||||||
echo R_opts=\"\"; \
|
|
||||||
echo libs=\"-lpng15\"; \
|
|
||||||
echo all_libs=\"-lpng15 $(LIBADDFLAGS)\"; \
|
|
||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
|
||||||
chmod +x libpng-config
|
|
||||||
|
|
||||||
$(LIBSO): $(LIBSOMAJ)
|
|
||||||
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
|
||||||
|
|
||||||
$(LIBSOMAJ): $(OBJSDLL) libpng.syms
|
|
||||||
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) \
|
|
||||||
-Wl,-version-script,libpng.syms \
|
|
||||||
-o $(LIBSOMAJ) \
|
|
||||||
$(OBJSDLL)
|
|
||||||
|
|
||||||
pngtest: pngtest.o $(LIBSO)
|
|
||||||
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
|
||||||
|
|
||||||
pngtest-static: pngtest.o libpng.a
|
|
||||||
$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
|
|
||||||
|
|
||||||
test: pngtest pngtest-static
|
|
||||||
@echo ""
|
|
||||||
@echo " Running pngtest dynamically linked with $(LIBSO):"
|
|
||||||
@echo ""
|
|
||||||
LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ./pngtest
|
|
||||||
@echo ""
|
|
||||||
@echo " Running pngtest statically linked with libpng.a:"
|
|
||||||
@echo ""
|
|
||||||
./pngtest-static
|
|
||||||
|
|
||||||
install-headers: png.h pngconf.h pnglibconf.h
|
|
||||||
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
|
||||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
|
||||||
cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
|
|
||||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
|
|
||||||
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
|
|
||||||
-@$(RM_F) $(DI)/libpng
|
|
||||||
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
|
|
||||||
|
|
||||||
install-static: install-headers libpng.a
|
|
||||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
|
||||||
cp libpng.a $(DL)/$(LIBNAME).a
|
|
||||||
chmod 644 $(DL)/$(LIBNAME).a
|
|
||||||
-@$(RM_F) $(DL)/libpng.a
|
|
||||||
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
|
|
||||||
|
|
||||||
install-shared: install-headers $(LIBSOMAJ) libpng.pc
|
|
||||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
|
||||||
-@$(RM_F) $(DL)/$(LIBSO)
|
|
||||||
-@$(RM_F) $(DL)/$(LIBSOREL)
|
|
||||||
-@$(RM_F) $(DL)/$(OLDSO)
|
|
||||||
cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
|
|
||||||
chmod 755 $(DL)/$(LIBSOREL)
|
|
||||||
(cd $(DL); \
|
|
||||||
$(LN_SF) $(LIBSOREL) $(LIBSO); \
|
|
||||||
$(LN_SF) $(LIBSO) $(OLDSO))
|
|
||||||
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
|
|
||||||
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
|
|
||||||
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
|
|
||||||
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
|
|
||||||
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
|
|
||||||
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
|
|
||||||
|
|
||||||
install-man: libpng.3 libpngpf.3 png.5
|
|
||||||
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
|
|
||||||
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
|
|
||||||
-@$(RM_F) $(DM)/man3/libpng.3
|
|
||||||
-@$(RM_F) $(DM)/man3/libpngpf.3
|
|
||||||
cp libpng.3 $(DM)/man3
|
|
||||||
cp libpngpf.3 $(DM)/man3
|
|
||||||
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
|
|
||||||
-@$(RM_F) $(DM)/man5/png.5
|
|
||||||
cp png.5 $(DM)/man5
|
|
||||||
|
|
||||||
install-config: libpng-config
|
|
||||||
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
|
|
||||||
-@$(RM_F) $(DB)/libpng-config
|
|
||||||
-@$(RM_F) $(DB)/$(LIBNAME)-config
|
|
||||||
cp libpng-config $(DB)/$(LIBNAME)-config
|
|
||||||
chmod 755 $(DB)/$(LIBNAME)-config
|
|
||||||
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
|
|
||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
|
||||||
|
|
||||||
# If you installed in $(DESTDIR), test-installed won't work until you
|
|
||||||
# move the library to its final location. Use test-dd to test it
|
|
||||||
# before then.
|
|
||||||
|
|
||||||
test-dd:
|
|
||||||
echo
|
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
|
||||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
|
||||||
./pngtestd pngtest.png
|
|
||||||
|
|
||||||
test-installed:
|
|
||||||
$(CC) -I$(ZLIBINC) \
|
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
|
||||||
./pngtesti pngtest.png
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM_F) *.o libpng.a libpng.syms pngtest pngout.png libpng-config \
|
|
||||||
$(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
|
|
||||||
libpng.pc pnglibconf.h
|
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
|
||||||
writelock:
|
|
||||||
chmod a-w *.[ch35] $(DOCS) scripts/*
|
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
||||||
|
|
||||||
png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
||||||
|
|
||||||
pngtest.o: png.h pngconf.h pnglibconf.h
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
# makefile for libpng under FreeBSD
|
# makefile for libpng under FreeBSD
|
||||||
|
# Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||||
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
|
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -12,7 +13,7 @@ LIB= png
|
|||||||
SHLIB_MAJOR= ${SHLIB_VER}
|
SHLIB_MAJOR= ${SHLIB_VER}
|
||||||
SHLIB_MINOR= 0
|
SHLIB_MINOR= 0
|
||||||
NO_PROFILE= YES
|
NO_PROFILE= YES
|
||||||
NO_OBJ= YES
|
NO_OBJ= YES
|
||||||
|
|
||||||
# where make install puts libpng.a and png.h
|
# where make install puts libpng.a and png.h
|
||||||
DESTDIR= ${PREFIX}
|
DESTDIR= ${PREFIX}
|
||||||
@@ -30,17 +31,25 @@ SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
|
|||||||
ZLIBLIB= /usr/lib
|
ZLIBLIB= /usr/lib
|
||||||
ZLIBINC= /usr/include
|
ZLIBINC= /usr/include
|
||||||
|
|
||||||
LDADD+= -lm -lz
|
LDADD+= -lm -lz
|
||||||
#LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ?
|
#LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ?
|
||||||
|
|
||||||
DPADD+= ${LIBM} ${LIBZ}
|
DPADD+= ${LIBM} ${LIBZ}
|
||||||
|
|
||||||
CFLAGS+= -I. -I${ZLIBINC}
|
CPPFLAGS+= -I. -I${ZLIBINC}
|
||||||
|
CFLAGS+= -W -Wall
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
pngtest: pngtest.o libpng.a
|
pngtest: pngtest.o libpng.a
|
||||||
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
|
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
|
||||||
-lpng ${LDADD}
|
-lpng ${LDADD}
|
||||||
@@ -50,9 +59,8 @@ CLEANFILES= pngtest pngtest.o pngout.png
|
|||||||
test: pngtest
|
test: pngtest
|
||||||
./pngtest
|
./pngtest
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
cp $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
writelock:
|
writelock:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng using gcc (generic, static library)
|
# makefile for libpng using gcc (generic, static library)
|
||||||
# Copyright (C) 2008 Glenn Randers-Pehrson
|
# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@@ -16,72 +16,72 @@ CC = gcc
|
|||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
AR_RC = ar rcs
|
AR_RC = ar rcs
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
|
CP = cp
|
||||||
RM_F = rm -f
|
RM_F = rm -f
|
||||||
|
|
||||||
CDEBUG = -g -DPNG_DEBUG=5
|
WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
LDDEBUG =
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
CRELEASE = -O2
|
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
||||||
LDRELEASE = -s
|
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
#CFLAGS = -W -Wall $(CDEBUG)
|
CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
|
||||||
CFLAGS = -W -Wall $(CRELEASE)
|
LDFLAGS =
|
||||||
#LDFLAGS = $(LDDEBUG)
|
|
||||||
LDFLAGS = $(LDRELEASE)
|
|
||||||
LIBS = -lz -lm
|
LIBS = -lz -lm
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
O=.o
|
EXEEXT =
|
||||||
A=.a
|
|
||||||
EXE=
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
||||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
all: static
|
all: static
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
.c$(O):
|
.c.o:
|
||||||
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
static: libpng$(A) pngtest$(EXE)
|
static: libpng.a pngtest$(EXEEXT)
|
||||||
|
|
||||||
shared:
|
shared:
|
||||||
@echo This is a generic makefile that cannot create shared libraries.
|
@echo This is a generic makefile that cannot create shared libraries.
|
||||||
@echo Please use a configuration that is specific to your platform.
|
@echo Please use a configuration that is specific to your platform.
|
||||||
@false
|
@false
|
||||||
|
|
||||||
libpng$(A): $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
test: pngtest$(EXE)
|
test: pngtest$(EXEEXT)
|
||||||
./pngtest$(EXE)
|
./pngtest$(EXEEXT)
|
||||||
|
|
||||||
pngtest$(EXE): pngtest$(O) libpng$(A)
|
pngtest$(EXEEXT): pngtest.o libpng.a
|
||||||
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
|
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest.o libpng.a $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h
|
$(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest.o: png.h pngconf.h pnglibconf.h
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||||
# Copyright (C) 1999-2002, 2006, 2009, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 1999-2002, 2006, 2009, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||||
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||||
#
|
#
|
||||||
@@ -34,13 +34,14 @@ CC=cc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -sf
|
LN_SF=ln -sf
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
CPPFLAGS=-I$(ZLIBINC) \
|
||||||
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_UNISTD_H -DUSE_MMAP
|
||||||
|
CFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
|
||||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||||
CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
|
CCFLAGS=-O -Ae -Wl,+vnocompatwarnings +DD64 +Z
|
||||||
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
|
|
||||||
|
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
@@ -67,6 +68,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -75,14 +80,16 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -99,7 +106,7 @@ libpng-config:
|
|||||||
( cat scripts/libpng-config-head.in; \
|
( cat scripts/libpng-config-head.in; \
|
||||||
echo prefix=\"$(prefix)\"; \
|
echo prefix=\"$(prefix)\"; \
|
||||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||||
echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
|
echo ccopts=\"-O -Ae -Wl,+vnocompatwarnings +DD64 +Z\"; \
|
||||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||||
echo libs=\"-lpng15 -lz -lm\"; \
|
echo libs=\"-lpng15 -lz -lm\"; \
|
||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
@@ -179,7 +186,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
|
$(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
@@ -188,7 +195,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(CCFLAGS) \
|
$(CC) $(CPPFLAGS) $(CCFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
|
||||||
# Copyright (C) 2002, 2006-2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2001, Laurent faillie
|
# Copyright (C) 2001, Laurent faillie
|
||||||
# Copyright (C) 1998, 1999 Greg Roelofs
|
# Copyright (C) 1998, 1999 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@@ -25,6 +25,7 @@ AR_RC=ar rc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -sf
|
LN_SF=ln -sf
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# where "make install" puts libpng.a, $(OLDSO)*, png.h, pngconf.h
|
# where "make install" puts libpng.a, $(OLDSO)*, png.h, pngconf.h
|
||||||
@@ -53,8 +54,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=-W -Wall -O3 -funroll-loops $(ALIGN) # $(WARNMORE) -g
|
||||||
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng15 -lz -lm
|
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
|
|
||||||
@@ -86,8 +87,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
@@ -185,7 +189,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
@@ -194,7 +198,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
|
||||||
# Copyright (C) 1999-2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 1999-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42
|
||||||
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
|
||||||
#
|
#
|
||||||
@@ -14,7 +14,8 @@ ZLIBINC=/opt/zlib/include
|
|||||||
# Note that if you plan to build a libpng shared library, zlib must also
|
# Note that if you plan to build a libpng shared library, zlib must also
|
||||||
# be a shared library, which zlib's configure does not do. After running
|
# be a shared library, which zlib's configure does not do. After running
|
||||||
# zlib's configure, edit the appropriate lines of makefile to read:
|
# zlib's configure, edit the appropriate lines of makefile to read:
|
||||||
# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
|
# CPPFLAGS=-DHAVE_UNISTD -DUSE_MAP
|
||||||
|
# CFLAGS=-O1 -fPIC
|
||||||
# LDSHARED=ld -b
|
# LDSHARED=ld -b
|
||||||
# SHAREDLIB=libz.sl
|
# SHAREDLIB=libz.sl
|
||||||
|
|
||||||
@@ -44,9 +45,10 @@ LIBPATH=$(exec_prefix)/lib
|
|||||||
MANPATH=$(prefix)/man
|
MANPATH=$(prefix)/man
|
||||||
BINPATH=$(exec_prefix)/bin
|
BINPATH=$(exec_prefix)/bin
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
CPPFLAGS=-I$(ZLIBINC)
|
||||||
|
CFLAGS=-O -Ae +DA1.1 +DS2.0
|
||||||
# Caution: be sure you have built zlib with the same CFLAGS.
|
# Caution: be sure you have built zlib with the same CFLAGS.
|
||||||
CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
|
CCFLAGS=-O -Ae +DA1.1 +DS2.0
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
# override DESTDIR= on the make install command line to easily support
|
# override DESTDIR= on the make install command line to easily support
|
||||||
@@ -64,6 +66,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -72,14 +78,16 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) +z -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) +z -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -96,7 +104,7 @@ libpng-config:
|
|||||||
( cat scripts/libpng-config-head.in; \
|
( cat scripts/libpng-config-head.in; \
|
||||||
echo prefix=\"$(prefix)\"; \
|
echo prefix=\"$(prefix)\"; \
|
||||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||||
echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
|
echo ccopts=\"-O -Ae +DA1.1 +DS2.0\"; \
|
||||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||||
echo libs=\"-lpng15 -lz -lm\"; \
|
echo libs=\"-lpng15 -lz -lm\"; \
|
||||||
cat scripts/libpng-config-body.in ) > libpng-config
|
cat scripts/libpng-config-body.in ) > libpng-config
|
||||||
@@ -176,7 +184,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
|
$(CC) -I$(DI) $(CPPFLAGS) $(CCFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
@@ -185,7 +193,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) $(CCFLAGS) \
|
$(CC) $(CPPFLAGS) $(CCFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Makefile for libpng (static)
|
# Makefile for libpng (static)
|
||||||
# IBM C version 3.x for Win32 and OS/2
|
# IBM C version 3.x for Win32 and OS/2
|
||||||
# Copyright (C) 2006 Glenn Randers-Pehrson
|
# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -21,11 +21,17 @@ ZLIBLIB = ../zlib
|
|||||||
CC = icc
|
CC = icc
|
||||||
LD = ilink
|
LD = ilink
|
||||||
AR = ilib
|
AR = ilib
|
||||||
|
CP = copy
|
||||||
RM = del
|
RM = del
|
||||||
|
|
||||||
CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
|
CPPFLAGS = -I$(ZLIBINC)
|
||||||
|
CFLAGS = -Mc -O2 -W3
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
O=.obj
|
O=.obj
|
||||||
A=.lib
|
A=.lib
|
||||||
@@ -39,11 +45,13 @@ OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
|||||||
LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
|
LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
|
.c$(O):
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
all: libpng$(A) pngtest$(E)
|
all: libpng$(A) pngtest$(E)
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng$(A): $(OBJS)
|
libpng$(A): $(OBJS)
|
||||||
$(AR) -out:$@ $(OBJS)
|
$(AR) -out:$@ $(OBJS)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Makefile for libpng
|
# Makefile for libpng
|
||||||
# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later
|
# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later
|
||||||
|
|
||||||
# Copyright (C) 2006 Glenn Randers-Pehrson
|
# Copyright (C) 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
|
# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
|
||||||
# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
|
# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
@@ -32,9 +32,15 @@ CALLING=r # __fastcall
|
|||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
CC=icl -c
|
CC=icl -c
|
||||||
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
|
CPPFLAGS=-I$(ZLIBINC)
|
||||||
|
CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -nologo
|
||||||
LD=link
|
LD=link
|
||||||
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
|
LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
|
||||||
|
CP=cp
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts\pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
|
||||||
|
|
||||||
O=.obj
|
O=.obj
|
||||||
|
|
||||||
@@ -44,54 +50,53 @@ pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
|
|||||||
|
|
||||||
all: test
|
all: test
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
libpng.lib: $(OBJS)
|
libpng.lib: $(OBJS)
|
||||||
if exist libpng.lib del libpng.lib
|
if exist libpng.lib del libpng.lib
|
||||||
@@ -101,7 +106,7 @@ pngtest.exe: pngtest.obj libpng.lib
|
|||||||
$(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
|
$(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
||||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
test: pngtest.exe
|
test: pngtest.exe
|
||||||
pngtest.exe
|
pngtest.exe
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -26,14 +26,22 @@ LIBPATH=$(prefix)/lib
|
|||||||
# you execute make install.
|
# you execute make install.
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
CC=cc
|
CC = cc
|
||||||
CFLAGS=-I../zlib -O
|
CPPFLAGS = -I../zlib
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
CFLAGS = -O
|
||||||
|
LDFLAGS = -L. -L../zlib/ -lpng -lz -lm
|
||||||
# flags for ansi2knr
|
# flags for ansi2knr
|
||||||
ANSI2KNRFLAGS=
|
ANSI2KNRFLAGS=
|
||||||
|
|
||||||
RANLIB=ranlib
|
RANLIB = ranlib
|
||||||
#RANLIB=echo
|
#RANLIB = echo
|
||||||
|
|
||||||
|
CP = cp
|
||||||
|
RM_F = rm -f
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
@@ -41,19 +49,18 @@ OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
|||||||
|
|
||||||
all: ansi2knr libpng.a pngtest
|
all: ansi2knr libpng.a pngtest
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
# general rule to allow ansi2knr to work
|
# general rule to allow ansi2knr to work
|
||||||
.c.o:
|
.c.o:
|
||||||
./ansi2knr $*.c T$*.c
|
./ansi2knr $*.c T$*.c
|
||||||
$(CC) $(CFLAGS) -c T$*.c
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c T$*.c
|
||||||
rm -f T$*.c $*.o
|
rm -f T$*.c $*.o
|
||||||
mv T$*.o $*.o
|
mv T$*.o $*.o
|
||||||
|
|
||||||
ansi2knr: ansi2knr.c
|
ansi2knr: ansi2knr.c
|
||||||
$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
|
||||||
|
|
||||||
libpng.a: ansi2knr $(OBJS)
|
libpng.a: ansi2knr $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
ar rc $@ $(OBJS)
|
||||||
@@ -82,7 +89,7 @@ install: libpng.a png.h pngconf.h pnglibconf.h
|
|||||||
chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
|
chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o libpng.a pngtest pngout.png ansi2knr pnglibconf.h
|
$(RM_F) *.o libpng.a pngtest pngout.png ansi2knr pnglibconf.h
|
||||||
|
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||||
writelock:
|
writelock:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng15.so on Linux ELF with gcc
|
# makefile for libpng.a and libpng15.so on Linux ELF with gcc
|
||||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs and
|
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
|
||||||
# Glenn Randers-Pehrson
|
# Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng15
|
LIBNAME = libpng15
|
||||||
PNGMAJ = 15
|
PNGMAJ = 15
|
||||||
RELEASE = 16
|
RELEASE = 21
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).so
|
LIBSO=$(LIBNAME).so
|
||||||
@@ -24,6 +24,7 @@ CC=gcc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -sf
|
LN_SF=ln -sf
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# where "make install" puts libpng15.a, libpng15.so*,
|
# where "make install" puts libpng15.a, libpng15.so*,
|
||||||
@@ -48,7 +49,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
|||||||
|
|
||||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS= -W -Wall -O3 -funroll-loops \
|
||||||
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
|
|
||||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng15 -lz -lm
|
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
@@ -74,6 +76,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -82,14 +88,16 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -196,14 +204,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) Glenn Randers-Pehrson
|
# Copyright (C) 1998-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -22,22 +22,31 @@ LIBPATH=$(prefix)/lib
|
|||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
|
CPPFLAGS=-I../zlib -DSYSV -Dmips
|
||||||
|
CFLAGS=-O -systype sysv -w
|
||||||
#CFLAGS=-O
|
#CFLAGS=-O
|
||||||
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
||||||
|
|
||||||
#RANLIB=ranlib
|
#RANLIB=ranlib
|
||||||
RANLIB=echo
|
RANLIB=echo
|
||||||
|
|
||||||
|
CP=cp
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
ar rc $@ $(OBJS)
|
ar rc $@ $(OBJS)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
# Copyright (C) 2006, 2009 Glenn Randers-Pehrson
|
# Copyright (C) 2006, 2009, 2014 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -10,13 +10,19 @@
|
|||||||
|
|
||||||
# -------- Microsoft C 5.1 and later, does not use assembler code --------
|
# -------- Microsoft C 5.1 and later, does not use assembler code --------
|
||||||
MODEL=L
|
MODEL=L
|
||||||
CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
|
CPPFLAGS=-I..\zlib
|
||||||
|
CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL)
|
||||||
#-Ox generates bad code with MSC 5.1
|
#-Ox generates bad code with MSC 5.1
|
||||||
CC=cl
|
CC=cl
|
||||||
LD=link
|
LD=link
|
||||||
LDFLAGS=/e/st:0x1500/noe
|
LDFLAGS=/e/st:0x1500/noe
|
||||||
|
CP=copy
|
||||||
O=.obj
|
O=.obj
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts\pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
|
||||||
|
|
||||||
#uncomment next to put error messages in a file
|
#uncomment next to put error messages in a file
|
||||||
ERRFILE= >> pngerrs
|
ERRFILE= >> pngerrs
|
||||||
|
|
||||||
@@ -27,54 +33,53 @@ OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
|
|||||||
|
|
||||||
all: libpng.lib
|
all: libpng.lib
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
||||||
del libpng.lib
|
del libpng.lib
|
||||||
@@ -83,7 +88,7 @@ libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
|||||||
lib libpng $(OBJS3);
|
lib libpng $(OBJS3);
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtest.exe: pngtest.obj libpng.lib
|
pngtest.exe: pngtest.obj libpng.lib
|
||||||
$(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ;
|
$(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
|
# Copyright (C) 2012 Glenn Randers-Pehrson and Christopher M. Wheeler
|
||||||
#
|
#
|
||||||
# Portions taken from makefile.linux:
|
# Portions taken from makefile.linux:
|
||||||
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2011 Greg Roelofs and
|
# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010-2014 Greg Roelofs and
|
||||||
# Glenn Randers-Pehrson
|
# Glenn Randers-Pehrson
|
||||||
# Copyright (C) 2000 Cosmin Truta
|
# Copyright (C) 2000 Cosmin Truta
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@@ -18,7 +18,7 @@ exec_prefix=$(prefix)
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng15
|
LIBNAME = libpng15
|
||||||
PNGMAJ = 15
|
PNGMAJ = 15
|
||||||
RELEASE = 16
|
RELEASE = 21
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).dll
|
LIBSO=$(LIBNAME).dll
|
||||||
@@ -37,6 +37,7 @@ CC = gcc
|
|||||||
LD = $(CC)
|
LD = $(CC)
|
||||||
AR_RC = ar rcs
|
AR_RC = ar rcs
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
|
CP = cp
|
||||||
RM_F = rm -rf
|
RM_F = rm -rf
|
||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -sf
|
LN_SF=ln -sf
|
||||||
@@ -44,20 +45,13 @@ LN_SF=ln -sf
|
|||||||
#ARCH = -march=pentium3
|
#ARCH = -march=pentium3
|
||||||
#ARCH = -march=i686
|
#ARCH = -march=i686
|
||||||
ARCH =
|
ARCH =
|
||||||
CDEBUG = -g -DPNG_DEBUG=5
|
CPPFLAGS = # -DPNG_DEBUG=5
|
||||||
LDDEBUG =
|
CFLAGS = -W -Wall -O2 $(ARCH) # -g
|
||||||
CRELEASE = -O2
|
LDFLAGS =
|
||||||
LDRELEASE = -s
|
|
||||||
#CFLAGS = -W -Wall $(CDEBUG)
|
|
||||||
CFLAGS = -W -Wall $(CRELEASE) $(ARCH)
|
|
||||||
#LDFLAGS = $(LDDEBUG)
|
|
||||||
LDFLAGS = $(LDRELEASE)
|
|
||||||
LIBS = -lz -lm
|
LIBS = -lz -lm
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
O=.o
|
EXEEXT=.exe
|
||||||
A=.a
|
|
||||||
EXE=.exe
|
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
LIBPATH=$(exec_prefix)/lib
|
LIBPATH=$(exec_prefix)/lib
|
||||||
@@ -80,22 +74,25 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
|
OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
||||||
pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
|
pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
||||||
pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
|
pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
all: static shared
|
all: static shared
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
.c$(O):
|
.c.o:
|
||||||
$(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
|
||||||
|
|
||||||
static: libpng$(A) pngtest$(EXE)
|
static: libpng.a pngtest$(EXEEXT)
|
||||||
|
|
||||||
shared: $(LIBSOMAJ)
|
shared: $(LIBSOMAJ)
|
||||||
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSO)
|
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSO)
|
||||||
@@ -106,7 +103,7 @@ $(LIBSO): $(LIBSOMAJ)
|
|||||||
$(LIBSOMAJ):
|
$(LIBSOMAJ):
|
||||||
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ)
|
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ)
|
||||||
|
|
||||||
libpng$(A): $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
@@ -175,30 +172,30 @@ install-config: libpng-config
|
|||||||
|
|
||||||
install: install-static install-shared install-man install-config
|
install: install-static install-shared install-man install-config
|
||||||
|
|
||||||
test: pngtest$(EXE)
|
test: pngtest$(EXEEXT)
|
||||||
./pngtest$(EXE)
|
./pngtest$(EXEEXT)
|
||||||
|
|
||||||
pngtest$(EXE): pngtest$(O) libpng$(A)
|
pngtest$(EXEEXT): pngtest.o libpng.a
|
||||||
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
|
$(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest.o libpng.a $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h $(LIBSO) \
|
$(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h $(LIBSO) \
|
||||||
$(LIBSOMAJ) libpng-config
|
$(LIBSOMAJ) libpng-config
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest.o: png.h pngconf.h pnglibconf.h
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# make obj && make depend && make && make test
|
# make obj && make depend && make && make test
|
||||||
# make includes && make install
|
# make includes && make install
|
||||||
# Copyright (C) 2002 Patrick R.L. Welche
|
# Copyright (C) 2002 Patrick R.L. Welche
|
||||||
# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
|
# Copyright (C) 2007, 2009, 2014 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng15
|
|||||||
|
|
||||||
LIB= png15
|
LIB= png15
|
||||||
SHLIB_MAJOR= 0
|
SHLIB_MAJOR= 0
|
||||||
SHLIB_MINOR= 1.5.16
|
SHLIB_MINOR= 1.5.21
|
||||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||||
@@ -26,6 +26,10 @@ MAN= libpng.3 libpngpf.3 png.5
|
|||||||
|
|
||||||
CPPFLAGS+=-I${.CURDIR}
|
CPPFLAGS+=-I${.CURDIR}
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
# We should be able to do something like this instead of the manual
|
# We should be able to do something like this instead of the manual
|
||||||
# uncommenting, but it core dumps for me at the moment:
|
# uncommenting, but it core dumps for me at the moment:
|
||||||
# .if ${MACHINE_ARCH} == "i386"
|
# .if ${MACHINE_ARCH} == "i386"
|
||||||
@@ -34,9 +38,11 @@ CPPFLAGS+=-I${.CURDIR}
|
|||||||
|
|
||||||
CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
.c.o:
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
|
cp $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
|
|
||||||
pngtest.o: pngtest.c
|
pngtest.o: pngtest.c
|
||||||
${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
|
${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# make obj && make depend && make && make test
|
# make obj && make depend && make && make test
|
||||||
# make includes && make install
|
# make includes && make install
|
||||||
# Copyright (C) 2002 Patrick R.L. Welche
|
# Copyright (C) 2002 Patrick R.L. Welche
|
||||||
# Copyright (C) 2007-2009 Glenn Randers-Pehrson
|
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
|
|||||||
|
|
||||||
LIB= png
|
LIB= png
|
||||||
SHLIB_MAJOR= 15
|
SHLIB_MAJOR= 15
|
||||||
SHLIB_MINOR= 1.5.16
|
SHLIB_MINOR= 1.5.21
|
||||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||||
@@ -26,6 +26,10 @@ MAN= libpng.3 libpngpf.3 png.5
|
|||||||
|
|
||||||
CPPFLAGS+=-I${.CURDIR}
|
CPPFLAGS+=-I${.CURDIR}
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
# We should be able to do something like this instead of the manual
|
# We should be able to do something like this instead of the manual
|
||||||
# uncommenting, but it core dumps for me at the moment:
|
# uncommenting, but it core dumps for me at the moment:
|
||||||
# .if ${MACHINE_ARCH} == "i386"
|
# .if ${MACHINE_ARCH} == "i386"
|
||||||
@@ -34,9 +38,11 @@ CPPFLAGS+=-I${.CURDIR}
|
|||||||
|
|
||||||
CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
.c.o:
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
|
cp $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
|
|
||||||
pngtest.o: pngtest.c
|
pngtest.o: pngtest.c
|
||||||
${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
|
${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
|
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
# Copyright (C) 2007-2009 Glenn Randers-Pehrson
|
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
|
|||||||
MANDIR= ${PREFIX}/man/cat
|
MANDIR= ${PREFIX}/man/cat
|
||||||
|
|
||||||
SHLIB_MAJOR= 15
|
SHLIB_MAJOR= 15
|
||||||
SHLIB_MINOR= 1.5.16
|
SHLIB_MINOR= 1.5.21
|
||||||
|
|
||||||
LIB= png
|
LIB= png
|
||||||
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
||||||
@@ -28,12 +28,18 @@ NOPROFILE= Yes
|
|||||||
CLEANFILES+= pngtest.o pngtest pnglibconf.h
|
CLEANFILES+= pngtest.o pngtest pnglibconf.h
|
||||||
|
|
||||||
MAN= libpng.3 libpngpf.3 png.5
|
MAN= libpng.3 libpngpf.3 png.5
|
||||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
|
DOCS= ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
|
||||||
libpng-manual.txt
|
libpng-manual.txt
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
# Pre-built configuration
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
# See scripts/pnglibconf.mak for more options
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
|
cp $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
|
|
||||||
pngtest.o: pngtest.c
|
pngtest.o: pngtest.c
|
||||||
${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
|
${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
|
# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
|
||||||
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
|
||||||
# Copyright (C) 2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@@ -25,6 +25,7 @@ AR_RC=ar rc
|
|||||||
MKDIR_P=mkdir
|
MKDIR_P=mkdir
|
||||||
LN_SF=ln -f -s
|
LN_SF=ln -f -s
|
||||||
RANLIB=echo
|
RANLIB=echo
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# where make install puts libpng.a, $(OLDSO)*, and png.h
|
# where make install puts libpng.a, $(OLDSO)*, and png.h
|
||||||
@@ -37,7 +38,8 @@ exec_prefix=$(prefix)
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
CFLAGS= -dy -belf -I$(ZLIBINC) -O3
|
CPPFLAGS=-I$(ZLIBINC)
|
||||||
|
CFLAGS= -dy -belf -O3
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@@ -60,6 +62,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -68,14 +74,16 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -175,14 +183,14 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) $(CFLAGS) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
./pngtestd pngtest.png
|
./pngtestd pngtest.png
|
||||||
|
|
||||||
test-installed:
|
test-installed:
|
||||||
$(CC) $(CFLAGS) \
|
$(CC) $(CPPFLAGS) $(CFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng15.so, SGI IRIX with 'cc'
|
# makefile for libpng.a and libpng15.so, SGI IRIX with 'cc'
|
||||||
# Copyright (C) 2001-2002, 2006, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2001-2002, 2006, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -22,6 +22,7 @@ CC=gcc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -sf
|
LN_SF=ln -sf
|
||||||
RANLIB=echo
|
RANLIB=echo
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# Where make install puts libpng.a, libpng15.so, and libpng15/png.h
|
# Where make install puts libpng.a, libpng15.so, and libpng15/png.h
|
||||||
@@ -42,8 +43,9 @@ ZLIBINC=../zlib
|
|||||||
# See "man abi". zlib must be built with the same ABI.
|
# See "man abi". zlib must be built with the same ABI.
|
||||||
ABI=
|
ABI=
|
||||||
|
|
||||||
WARNMORE= # -g -DPNG_DEBUG=5
|
WARNMORE=
|
||||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS=$(ABI) -O $(WARNMORE) -fPIC -mabi=n32 # -g
|
||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||||
-set_version sgi$(PNGMAJ).0
|
-set_version sgi$(PNGMAJ).0
|
||||||
@@ -70,15 +72,21 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest shared libpng.pc libpng-config
|
all: libpng.a pngtest shared libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -182,7 +190,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-rpath $(ZLIBLIB):$(DL) \
|
-rpath $(ZLIBLIB):$(DL) \
|
||||||
@@ -192,7 +200,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
|
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng.a and libpng15.so, SGI IRIX with 'cc'
|
# makefile for libpng.a and libpng15.so, SGI IRIX with 'cc'
|
||||||
# Copyright (C) 2001-2002, 2006, 2007, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2001-2002, 2006, 2007, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -22,6 +22,7 @@ CC=cc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -sf
|
LN_SF=ln -sf
|
||||||
RANLIB=echo
|
RANLIB=echo
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# Where make install puts libpng.a, libpng15.so, and libpng15/png.h
|
# Where make install puts libpng.a, libpng15.so, and libpng15/png.h
|
||||||
@@ -44,8 +45,9 @@ ABI=
|
|||||||
|
|
||||||
WARNMORE=-fullwarn
|
WARNMORE=-fullwarn
|
||||||
# Note: -KPIC is the default anyhow
|
# Note: -KPIC is the default anyhow
|
||||||
#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE)
|
#CFLAGS= $(ABI) -O $(WARNMORE) -KPIC # -g
|
||||||
|
CFLAGS=$(ABI) -O $(WARNMORE)
|
||||||
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng15 -lz -lm
|
LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
|
||||||
@@ -73,15 +75,21 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest shared libpng.pc libpng-config
|
all: libpng.a pngtest shared libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -182,7 +190,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(DL) -L$(ZLIBLIB) \
|
-L$(DL) -L$(ZLIBLIB) \
|
||||||
-rpath $(ZLIBLIB):$(DL) \
|
-rpath $(ZLIBLIB):$(DL) \
|
||||||
@@ -192,7 +200,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-L$(ZLIBLIB) \
|
-L$(ZLIBLIB) \
|
||||||
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
|
-rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# makefile for libpng on Solaris 9 (beta) with Forte cc
|
# makefile for libpng on Solaris 9 (beta) with Forte cc
|
||||||
# Updated by Chad Schrock for Solaris 9
|
# Updated by Chad Schrock for Solaris 9
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 2002, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1998-2001 Greg Roelofs
|
# Copyright (C) 1998-2001 Greg Roelofs
|
||||||
# Copyright (C) 1996-1997 Andreas Dilger
|
# Copyright (C) 1996-1997 Andreas Dilger
|
||||||
#
|
#
|
||||||
@@ -26,6 +26,7 @@ AR_RC=ar rc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -f -s
|
LN_SF=ln -f -s
|
||||||
RANLIB=echo
|
RANLIB=echo
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# Where make install puts libpng.a, $(OLDSO)*, and png.h
|
# Where make install puts libpng.a, $(OLDSO)*, and png.h
|
||||||
@@ -46,8 +47,9 @@ ZLIBINC=/usr/include
|
|||||||
#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
|
#CFLAGS=-W -Wall -O3 $(WARNMORE) -g
|
||||||
|
CFLAGS=-O3
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng15 -lz -lm
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@@ -70,6 +72,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -78,14 +84,16 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -KPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -194,7 +202,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
||||||
@@ -203,7 +211,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Solaris 2.x with gcc
|
# makefile for libpng on Solaris 2.x with gcc
|
||||||
# Copyright (C) 2004, 2006-2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@@ -24,6 +24,7 @@ CC=gcc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -f -s
|
LN_SF=ln -f -s
|
||||||
RANLIB=echo
|
RANLIB=echo
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# Where make install puts libpng.a, libpng15.so*, and png.h
|
# Where make install puts libpng.a, libpng15.so*, and png.h
|
||||||
@@ -42,7 +43,8 @@ ZLIBINC=/usr/local/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS= -W -Wall -O \
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
# $(WARNMORE) -g -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng15 -lz -lm
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
|
|
||||||
@@ -66,6 +68,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -74,14 +80,16 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -191,7 +199,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
||||||
@@ -200,7 +208,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng on Solaris 2.x with gcc
|
# makefile for libpng on Solaris 2.x with gcc
|
||||||
# Copyright (C) 2004, 2006-2008, 2010-2011 Glenn Randers-Pehrson
|
# Copyright (C) 2004, 2006-2008, 2010-2014 Glenn Randers-Pehrson
|
||||||
# Contributed by William L. Sebok, based on makefile.linux
|
# Contributed by William L. Sebok, based on makefile.linux
|
||||||
# Copyright (C) 1998 Greg Roelofs
|
# Copyright (C) 1998 Greg Roelofs
|
||||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||||
@@ -24,6 +24,7 @@ CC=gcc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -f -s
|
LN_SF=ln -f -s
|
||||||
RANLIB=echo
|
RANLIB=echo
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
# Where make install puts libpng.a, libpng15.so*, and png.h
|
# Where make install puts libpng.a, libpng15.so*, and png.h
|
||||||
@@ -42,8 +43,8 @@ ZLIBINC=/usr/local/include
|
|||||||
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||||
-Wmissing-declarations -Wtraditional -Wcast-align \
|
-Wmissing-declarations -Wtraditional -Wcast-align \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
|
||||||
CFLAGS=-I$(ZLIBINC) -W -Wall -O \
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
# $(WARNMORE) -g -DPNG_DEBUG=5
|
CFLAGS=-W -Wall -O # $(WARNMORE) -g
|
||||||
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng15 -lz -lm
|
LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng15 -lz -lm
|
||||||
|
|
||||||
INCPATH=$(prefix)/include
|
INCPATH=$(prefix)/include
|
||||||
@@ -66,6 +67,10 @@ DI=$(DESTDIR)$(INCPATH)
|
|||||||
DL=$(DESTDIR)$(LIBPATH)
|
DL=$(DESTDIR)$(LIBPATH)
|
||||||
DM=$(DESTDIR)$(MANPATH)
|
DM=$(DESTDIR)$(MANPATH)
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
@@ -74,14 +79,16 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
|||||||
|
|
||||||
.SUFFIXES: .c .o .pic.o
|
.SUFFIXES: .c .o .pic.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
.c.pic.o:
|
.c.pic.o:
|
||||||
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
|
||||||
|
|
||||||
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
@@ -191,7 +198,7 @@ install: install-static install-shared install-man install-config
|
|||||||
test-dd:
|
test-dd:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library in $(DL).
|
echo Testing installed dynamic shared library in $(DL).
|
||||||
$(CC) -I$(DI) -I$(ZLIBINC) \
|
$(CC) -I$(DI) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
-L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
|
||||||
@@ -200,7 +207,7 @@ test-dd:
|
|||||||
test-installed:
|
test-installed:
|
||||||
echo
|
echo
|
||||||
echo Testing installed dynamic shared library.
|
echo Testing installed dynamic shared library.
|
||||||
$(CC) -I$(ZLIBINC) \
|
$(CC) $(CPPFLAGS) \
|
||||||
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
|
||||||
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
|
||||||
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
-L$(ZLIBLIB) -R$(ZLIBLIB)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -27,12 +27,13 @@ DESTDIR=
|
|||||||
ZLIBLIB=../zlib
|
ZLIBLIB=../zlib
|
||||||
ZLIBINC=../zlib
|
ZLIBINC=../zlib
|
||||||
|
|
||||||
CC=cc
|
CC = cc
|
||||||
AR_RC=ar rc
|
AR_RC = ar rc
|
||||||
MKDIR_P=mkdir
|
MKDIR_P = mkdir
|
||||||
LN_SF=ln -sf
|
LN_SF = ln -sf
|
||||||
RANLIB=ranlib
|
RANLIB = ranlib
|
||||||
RM_F=rm -f
|
CP = cp
|
||||||
|
RM_F = rm -f
|
||||||
AWK = awk
|
AWK = awk
|
||||||
SED = sed
|
SED = sed
|
||||||
CPP = $(CC) -E
|
CPP = $(CC) -E
|
||||||
@@ -40,13 +41,21 @@ ECHO = echo
|
|||||||
|
|
||||||
DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
|
DFNFLAGS = # DFNFLAGS contains -D options to use in the libpng build
|
||||||
DFA_EXTRA = # extra files that can be used to control configuration
|
DFA_EXTRA = # extra files that can be used to control configuration
|
||||||
CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
CFLAGS = -O # -g
|
||||||
|
LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt,
|
# The standard pnglibconf.h exists as scripts/pnglibconf.h.prebuilt,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
|
# Copyright (C) 2002, 2006, 2014 Glenn Randers-Pehrson
|
||||||
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
||||||
#
|
#
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
@@ -37,20 +37,28 @@ AR_RC=ar rc
|
|||||||
MKDIR_P=mkdir -p
|
MKDIR_P=mkdir -p
|
||||||
LN_SF=ln -f -s
|
LN_SF=ln -f -s
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
|
CP=cp
|
||||||
RM_F=/bin/rm -f
|
RM_F=/bin/rm -f
|
||||||
|
|
||||||
CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
|
CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
|
||||||
|
CFLAGS=-O # $(WARNMORE)
|
||||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts/pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
||||||
|
|
||||||
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
||||||
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
||||||
pngwtran.o pngmem.o pngerror.o pngpread.o
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
all: libpng.a pngtest
|
all: libpng.a pngtest
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
libpng.a: $(OBJS)
|
libpng.a: $(OBJS)
|
||||||
$(AR_RC) $@ $(OBJS)
|
$(AR_RC) $@ $(OBJS)
|
||||||
|
|||||||
@@ -3,15 +3,23 @@
|
|||||||
|
|
||||||
# To use, do "make -fmakefile.tc3"
|
# To use, do "make -fmakefile.tc3"
|
||||||
|
|
||||||
# ----- Turbo C 3.00 (can be modified to work with earlier versions) -----
|
# ----- Turbo C++ 3.0 -----
|
||||||
|
|
||||||
MODEL=l
|
MODEL=l
|
||||||
CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib
|
CPPFLAGS=-I..\zlib
|
||||||
#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00
|
CFLAGS=-O2 -Z -m$(MODEL)
|
||||||
CC=tcc
|
CC=tcc
|
||||||
LD=tcc
|
LD=tcc
|
||||||
LIB=tlib
|
LIB=tlib
|
||||||
LDFLAGS=-m$(MODEL) -L..\zlib
|
LDFLAGS=-m$(MODEL) -L..\zlib
|
||||||
|
CP=copy
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts\pnglibconf.mak for more options
|
||||||
|
!ifndef PNGLIBCONF_H_PREBUILT
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
|
||||||
|
!endif
|
||||||
|
|
||||||
O=.obj
|
O=.obj
|
||||||
E=.exe
|
E=.exe
|
||||||
|
|
||||||
@@ -25,9 +33,8 @@ OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O)
|
|||||||
|
|
||||||
all: libpng$(MODEL).lib pngtest$(E)
|
all: libpng$(MODEL).lib pngtest$(E)
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts/pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
cp scripts/pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
pngtest: pngtest$(E)
|
pngtest: pngtest$(E)
|
||||||
|
|
||||||
@@ -35,52 +42,52 @@ test: pngtest$(E)
|
|||||||
pngtest$(E)
|
pngtest$(E)
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
||||||
|
|
||||||
libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
||||||
$(LIB) libpng$(MODEL) +$(OBJSL1)
|
$(LIB) libpng$(MODEL) +$(OBJSL1)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# makefile for libpng
|
# makefile for libpng
|
||||||
# Copyright (C) 1998 Tim Wegner
|
# Copyright (C) 1998 Tim Wegner
|
||||||
# Copyright (C) 2006,2009,2011 Glenn Randers-Pehrson
|
# Copyright (C) 2006,2009,2011,2014 Glenn Randers-Pehrson
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -9,17 +9,23 @@
|
|||||||
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
|
# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
|
||||||
# To use, do "nmake /f scripts\makefile.vcwin32"
|
# To use, do "nmake /f scripts\makefile.vcwin32"
|
||||||
|
|
||||||
# -------- Microsoft Visual C++ 2.0 and later, no assembler code --------
|
# -------- Microsoft Visual C++ 2.0 and later --------
|
||||||
|
|
||||||
# Compiler, linker, librarian, and other tools
|
# Compiler, linker, librarian and other tools
|
||||||
CC = cl
|
CC = cl
|
||||||
LD = link
|
LD = link
|
||||||
AR = lib
|
AR = lib
|
||||||
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3 -I..\zlib
|
CPPFLAGS = -I..\zlib
|
||||||
|
CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -MD -O2 -W3
|
||||||
LDFLAGS = -nologo
|
LDFLAGS = -nologo
|
||||||
ARFLAGS = -nologo
|
ARFLAGS = -nologo
|
||||||
|
CP = copy
|
||||||
RM = del
|
RM = del
|
||||||
|
|
||||||
|
# Pre-built configuration
|
||||||
|
# See scripts\pnglibconf.mak for more options
|
||||||
|
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
O=.obj
|
O=.obj
|
||||||
|
|
||||||
@@ -35,61 +41,60 @@ OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
|
|||||||
# Targets
|
# Targets
|
||||||
all: libpng.lib
|
all: libpng.lib
|
||||||
|
|
||||||
# see scripts/pnglibconf.mak for more options
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
||||||
pnglibconf.h: scripts\pnglibconf.h.prebuilt
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
||||||
copy scripts\pnglibconf.h.prebuilt $@
|
|
||||||
|
|
||||||
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
libpng.lib: $(OBJS)
|
libpng.lib: $(OBJS)
|
||||||
-$(RM) $@
|
-$(RM) $@
|
||||||
$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
|
$(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
|
||||||
|
|
||||||
pngtest$(O): png.h pngconf.h pnglibconf.h
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
||||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c $(ERRFILE)
|
||||||
|
|
||||||
pngtest.exe: pngtest$(O) libpng.lib
|
pngtest.exe: pngtest$(O) libpng.lib
|
||||||
$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
|
$(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ logunsupported = 1
|
|||||||
#
|
#
|
||||||
# If you create a private DLL you need to define the following
|
# If you create a private DLL you need to define the following
|
||||||
# macros in the file 'pngusr.h' and set -DPNG_USER_CONFIG for
|
# macros in the file 'pngusr.h' and set -DPNG_USER_CONFIG for
|
||||||
# compilation (i.e. in CFLAGS.)
|
# compilation (i.e. in CPPFLAGS.)
|
||||||
# #define PNG_USER_PRIVATEBUILD \
|
# #define PNG_USER_PRIVATEBUILD \
|
||||||
# <Describes by whom and why this version of the DLL was built>
|
# <Describes by whom and why this version of the DLL was built>
|
||||||
# e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
|
# e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
|
||||||
@@ -149,7 +149,7 @@ logunsupported = 1
|
|||||||
@# endif
|
@# endif
|
||||||
@#endif
|
@#endif
|
||||||
|
|
||||||
# Note that PNG_USR_CONFIG only has an effect when building
|
# Note that PNG_USER_CONFIG only has an effect when building
|
||||||
# pnglibconf.h
|
# pnglibconf.h
|
||||||
|
|
||||||
setting USER_CONFIG
|
setting USER_CONFIG
|
||||||
@@ -185,29 +185,39 @@ option READ_INT_FUNCTIONS requires READ
|
|||||||
option WRITE_INT_FUNCTIONS disabled
|
option WRITE_INT_FUNCTIONS disabled
|
||||||
option WRITE enables WRITE_INT_FUNCTIONS
|
option WRITE enables WRITE_INT_FUNCTIONS
|
||||||
|
|
||||||
# This setting allows a hardware or configuration specific filter optimization
|
|
||||||
# function to be specified, the argument is the name of the filter initializaion
|
|
||||||
# function to use.
|
|
||||||
|
|
||||||
setting FILTER_OPTIMIZATIONS
|
|
||||||
|
|
||||||
# Implementation specific control of the optimizations, enabled by those
|
# Implementation specific control of the optimizations, enabled by those
|
||||||
# hardware or software options that need it (typically when run-time choices
|
# hardware or software options that need it (typically when run-time choices
|
||||||
# must be made by the user)
|
# must be made by the user)
|
||||||
option SET_OPTION disabled
|
option SET_OPTION disabled
|
||||||
|
|
||||||
# These options are specific to the ARM NEON hardware optimizations:
|
# These options are specific to the ARM NEON hardware optimizations. At present
|
||||||
|
# these optimizations depend on GCC specific pre-processing of an assembler (.S)
|
||||||
|
# file so they probably won't work with other compilers.
|
||||||
#
|
#
|
||||||
# ARM_NEON: the optimization itself
|
# ARM_NEON_OPT: unset: check at compile time (__ARM_NEON__ must be defined by
|
||||||
# ARM_NEON_API: allow the optimization to be switched on with png_set_hardware
|
# the compiler, typically as a result of specifying
|
||||||
# ARM_NEON_CHECK: compile a run-time check to see if Neon extensions are
|
# CC="gcc -mfpu=neon".)
|
||||||
# supported, this is poorly supported and deprectated - use the
|
# 0: disable (even if the CPU has a NEON FPU.)
|
||||||
# png_set_hardware API.
|
# 1: check at run time (via ARM_NEON_{API,CHECK})
|
||||||
option ARM_NEON disabled,
|
# 2: switch on unconditionally (inadvisable - instead pass
|
||||||
sets FILTER_OPTIMIZATIONS png_init_filter_functions_neon
|
# -mfpu=neon to GCC in CC)
|
||||||
option ARM_NEON_API disabled enables SET_OPTION ARM_NEON
|
# When building libpng avoid using any setting other than '0'; '1' is
|
||||||
option ARM_NEON_CHECK disabled enables ARM_NEON
|
# set automatically when either 'API' or 'CHECK' are configured in,
|
||||||
|
# '2' should not be necessary as -mfpu=neon will achieve the same
|
||||||
|
# effect as well as applying NEON optimizations to the rest of the
|
||||||
|
# libpng code.
|
||||||
|
# NOTE: any setting other than '0' requires ALIGNED_MEMORY
|
||||||
|
# ARM_NEON_API: (PNG_ARM_NEON == 1) allow the optimization to be switched on
|
||||||
|
# with png_set_option
|
||||||
|
# ARM_NEON_CHECK: (PNG_ARM_NEON == 1) compile a run-time check to see if Neon
|
||||||
|
# extensions are supported, this is poorly supported and
|
||||||
|
# deprectated - use the png_set_option API.
|
||||||
|
setting ARM_NEON_OPT
|
||||||
|
option ARM_NEON_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
|
||||||
|
sets ARM_NEON_OPT 1
|
||||||
|
option ARM_NEON_CHECK disabled requires ALIGNED_MEMORY,
|
||||||
|
sets ARM_NEON_OPT 1
|
||||||
|
|
||||||
# Generic options - affect both read and write.
|
# Generic options - affect both read and write.
|
||||||
|
|
||||||
option WARNINGS
|
option WARNINGS
|
||||||
@@ -226,10 +236,6 @@ option FIXED_POINT enables ok_math
|
|||||||
|
|
||||||
option ERROR_TEXT
|
option ERROR_TEXT
|
||||||
|
|
||||||
# The following is always on (defined empty)
|
|
||||||
|
|
||||||
setting CALLOC_SUPPORTED default
|
|
||||||
|
|
||||||
# This protects us against compilers that run on a windowing system
|
# This protects us against compilers that run on a windowing system
|
||||||
# and thus don't have or would rather us not use the stdio types:
|
# and thus don't have or would rather us not use the stdio types:
|
||||||
# stdin, stdout, and stderr. The only one currently used is stderr
|
# stdin, stdout, and stderr. The only one currently used is stderr
|
||||||
@@ -380,12 +386,6 @@ option INCH_CONVERSIONS
|
|||||||
|
|
||||||
option BUILD_GRAYSCALE_PALETTE
|
option BUILD_GRAYSCALE_PALETTE
|
||||||
|
|
||||||
# This changes the default for the ARM NEON optimizations according to
|
|
||||||
# __ARM_NEON__
|
|
||||||
@#ifdef __ARM_NEON__
|
|
||||||
@# define PNG_ARM_NEON_SUPPORTED
|
|
||||||
@#endif
|
|
||||||
|
|
||||||
# IN DEVELOPMENT
|
# IN DEVELOPMENT
|
||||||
# These are currently experimental features; define them if you want
|
# These are currently experimental features; define them if you want
|
||||||
|
|
||||||
@@ -550,7 +550,7 @@ chunk cHRM
|
|||||||
chunk gAMA
|
chunk gAMA
|
||||||
chunk hIST
|
chunk hIST
|
||||||
chunk iCCP
|
chunk iCCP
|
||||||
chunk iTXt
|
chunk iTXt enables TEXT
|
||||||
chunk oFFs
|
chunk oFFs
|
||||||
chunk pCAL
|
chunk pCAL
|
||||||
chunk sCAL
|
chunk sCAL
|
||||||
@@ -561,7 +561,7 @@ chunk sRGB
|
|||||||
chunk tEXt requires TEXT
|
chunk tEXt requires TEXT
|
||||||
chunk tIME
|
chunk tIME
|
||||||
chunk tRNS
|
chunk tRNS
|
||||||
chunk zTXt
|
chunk zTXt enables TEXT
|
||||||
|
|
||||||
# This only affects support of the optional PLTE chunk in RGB and RGBA
|
# This only affects support of the optional PLTE chunk in RGB and RGBA
|
||||||
# images. Notice that READ_ANCILLARY_CHUNKS therefore disables part
|
# images. Notice that READ_ANCILLARY_CHUNKS therefore disables part
|
||||||
@@ -598,7 +598,6 @@ option READ_COMPRESSED_TEXT disabled
|
|||||||
option READ_iCCP enables READ_COMPRESSED_TEXT
|
option READ_iCCP enables READ_COMPRESSED_TEXT
|
||||||
option READ_iTXt enables READ_COMPRESSED_TEXT
|
option READ_iTXt enables READ_COMPRESSED_TEXT
|
||||||
option READ_zTXt enables READ_COMPRESSED_TEXT
|
option READ_zTXt enables READ_COMPRESSED_TEXT
|
||||||
option READ_COMPRESSED_TEXT enables READ_TEXT
|
|
||||||
|
|
||||||
option WRITE_oFFs enables SAVE_INT_32
|
option WRITE_oFFs enables SAVE_INT_32
|
||||||
option WRITE_pCAL enables SAVE_INT_32
|
option WRITE_pCAL enables SAVE_INT_32
|
||||||
@@ -607,7 +606,6 @@ option WRITE_COMPRESSED_TEXT disabled
|
|||||||
option WRITE_iCCP enables WRITE_COMPRESSED_TEXT
|
option WRITE_iCCP enables WRITE_COMPRESSED_TEXT
|
||||||
option WRITE_iTXt enables WRITE_COMPRESSED_TEXT
|
option WRITE_iTXt enables WRITE_COMPRESSED_TEXT
|
||||||
option WRITE_zTXt enables WRITE_COMPRESSED_TEXT
|
option WRITE_zTXt enables WRITE_COMPRESSED_TEXT
|
||||||
option WRITE_COMPRESSED_TEXT enables WRITE_TEXT
|
|
||||||
|
|
||||||
# Turn this off to disable png_read_png() and png_write_png() and
|
# Turn this off to disable png_read_png() and png_write_png() and
|
||||||
# leave the row_pointers member out of the info structure.
|
# leave the row_pointers member out of the info structure.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* 1.5.16 STANDARD API DEFINITION */
|
/* 1.5.21 STANDARD API DEFINITION */
|
||||||
/* pnglibconf.h - library build configuration */
|
/* pnglibconf.h - library build configuration */
|
||||||
|
|
||||||
/* libpng version 1.5.16 - May 23, 2013 */
|
/* libpng version 1.5.21 - December 22, 2014 */
|
||||||
|
|
||||||
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
|
||||||
|
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
#define PNG_ALIGNED_MEMORY_SUPPORTED
|
#define PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
/*#undef PNG_ARM_NEON_API_SUPPORTED*/
|
/*#undef PNG_ARM_NEON_API_SUPPORTED*/
|
||||||
/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
|
/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
|
||||||
/*#undef PNG_ARM_NEON_SUPPORTED*/
|
|
||||||
#define PNG_BENIGN_ERRORS_SUPPORTED
|
#define PNG_BENIGN_ERRORS_SUPPORTED
|
||||||
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
|
||||||
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
@@ -173,7 +172,6 @@
|
|||||||
/* end of options */
|
/* end of options */
|
||||||
/* settings */
|
/* settings */
|
||||||
#define PNG_API_RULE 0
|
#define PNG_API_RULE 0
|
||||||
#define PNG_CALLOC_SUPPORTED
|
|
||||||
#define PNG_COST_SHIFT 3
|
#define PNG_COST_SHIFT 3
|
||||||
#define PNG_DEFAULT_READ_MACROS 1
|
#define PNG_DEFAULT_READ_MACROS 1
|
||||||
#define PNG_GAMMA_THRESHOLD_FIXED 5000
|
#define PNG_GAMMA_THRESHOLD_FIXED 5000
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* sym.dfn - define format of libpng.sym
|
/* sym.c - define format of libpng.sym
|
||||||
*
|
*
|
||||||
* Last changed in libpng version 1.5.0 [January 6, 2011]
|
* Last changed in libpng version 1.6.16 [December 22, 2014]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -10,6 +10,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
||||||
|
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* symbols.dfn - find all exported symbols
|
/* symbols.c - find all exported symbols
|
||||||
*
|
*
|
||||||
* Last changed in libpng version 1.5.0 [January 6, 2011]
|
* Last changed in libpng version 1.6.16 [December 22, 2014]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -11,17 +11,17 @@
|
|||||||
|
|
||||||
/* NOTE: making 'symbols.chk' checks both that the exported
|
/* NOTE: making 'symbols.chk' checks both that the exported
|
||||||
* symbols in the library don't change and (implicitly) that
|
* symbols in the library don't change and (implicitly) that
|
||||||
* scripts/pnglibconf.h.prebuilt is as expected. If scripts/pnglibconf.h.prebuilt
|
* scripts/pnglibconf.h.prebuilt is as expected.
|
||||||
* is remade using scripts/pnglibconf.dfa then this checks the
|
* If scripts/pnglibconf.h.prebuilt is remade using
|
||||||
* .dfa file too.
|
* scripts/pnglibconf.dfa then this checks the .dfa file too.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DFN "@" name "@ @@" ordinal "@"
|
PNG_DFN "@" name "@ @@" ordinal "@"
|
||||||
#define PNG_REMOVED(ordinal, type, name, args, attributes)\
|
#define PNG_REMOVED(ordinal, type, name, args, attributes)\
|
||||||
PNG_DFN "; @" name "@ @@" ordinal "@"
|
PNG_DFN "; @" name "@ @@" ordinal "@"
|
||||||
#define PNG_EXPORT_LAST_ORDINAL(ordinal)\
|
#define PNG_EXPORT_LAST_ORDINAL(ordinal)\
|
||||||
PNG_DFN "; @@" ordinal "@"
|
PNG_DFN "; @@" ordinal "@"
|
||||||
|
|
||||||
/* Read the defaults, but use scripts/pnglibconf.h.prebuilt; the 'standard'
|
/* Read the defaults, but use scripts/pnglibconf.h.prebuilt; the 'standard'
|
||||||
* header file.
|
* header file.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user