Imported from libpng-1.4.0beta19.tar
This commit is contained in:
parent
c3f52f12bb
commit
a7dbcba1e8
30
ANNOUNCE
30
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.4.0beta18 - December 8, 2006
|
||||
Libpng 1.4.0beta19 - May 15, 2007
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@ -9,27 +9,27 @@ Files available for download:
|
||||
Source files with LF line endings (for Unix/Linux) and with a
|
||||
"configure" script
|
||||
|
||||
1.4.0beta18.tar.gz
|
||||
1.4.0beta18.tar.bz2
|
||||
1.4.0beta19.tar.gz
|
||||
1.4.0beta19.tar.bz2
|
||||
|
||||
Source files with LF line endings (for Unix/Linux) without the
|
||||
"configure" script
|
||||
|
||||
1.4.0beta18-no-config.tar.gz
|
||||
1.4.0beta18-no-config.tar.bz2
|
||||
1.4.0beta19-no-config.tar.gz
|
||||
1.4.0beta19-no-config.tar.bz2
|
||||
|
||||
Source files with CRLF line endings (for Windows), without the
|
||||
"configure" script
|
||||
|
||||
lp140b18.zip
|
||||
lp140b18.tar.bz2
|
||||
lp140b19.zip
|
||||
lp140b19.tar.bz2
|
||||
|
||||
Other information:
|
||||
|
||||
1.4.0beta18-README.txt
|
||||
1.4.0beta18-KNOWNBUGS.txt
|
||||
1.4.0beta18-LICENSE.txt
|
||||
1.4.0beta18-Y2K-compliance.txt
|
||||
1.4.0beta19-README.txt
|
||||
1.4.0beta19-KNOWNBUGS.txt
|
||||
1.4.0beta19-LICENSE.txt
|
||||
1.4.0beta19-Y2K-compliance.txt
|
||||
|
||||
Changes since the last public release (1.2.10):
|
||||
|
||||
@ -232,9 +232,15 @@ version 1.4.0beta16 [November 17, 2006]
|
||||
version 1.4.0beta17 [December 4, 2006]
|
||||
Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c
|
||||
|
||||
version 1.4.0beta18 [December 8, 2006]
|
||||
version 1.4.0beta18 [December 7, 2006]
|
||||
Added scripts/CMakeLists.txt
|
||||
|
||||
version 1.4.0beta19 [May 15, 2007]
|
||||
Revised scripts/CMakeLists.txt
|
||||
Rebuilt configure and Makefile.in with newer tools.
|
||||
Added "png_ptr->num_trans=0" before error return in png_handle_tRNS,
|
||||
to eliminate a vulnerability (CVE-2007-2554, CERT VU#684664)
|
||||
|
||||
version 1.4.0betaN [future]
|
||||
Build shared libraries with -lz and sometimes -lm.
|
||||
|
||||
|
10
CHANGES
10
CHANGES
@ -1736,9 +1736,17 @@ version 1.4.0beta17 [December 4, 2006]
|
||||
Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c
|
||||
Add "png_bytep" typecast to profile while calculating length in pngwutil.c
|
||||
|
||||
version 1.4.0beta18 [December 8, 2006]
|
||||
version 1.4.0beta18 [December 7, 2006]
|
||||
Added scripts/CMakeLists.txt
|
||||
|
||||
version 1.4.0beta19 [May 15, 2007]
|
||||
Revised scripts/CMakeLists.txt
|
||||
Rebuilt configure and Makefile.in with newer tools.
|
||||
Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers.
|
||||
Added scripts/makefile.nommx
|
||||
Added "png_ptr->num_trans=0" before error return in png_handle_tRNS,
|
||||
to eliminate a vulnerability (CVE-2007-2554, CERT VU#684664)
|
||||
|
||||
version 1.4.0betaN [future]
|
||||
Build shared libraries with -lz and sometimes -lm.
|
||||
|
||||
|
19
INSTALL
19
INSTALL
@ -1,5 +1,5 @@
|
||||
|
||||
Installing libpng version 1.4.0beta18 - December 8, 2006
|
||||
Installing libpng version 1.4.0beta19 - May 15, 2007
|
||||
|
||||
On Unix/Linux and similar systems, you can simply type
|
||||
|
||||
@ -44,7 +44,7 @@ to have access to the zlib.h and zconf.h include files that
|
||||
correspond to the version of zlib that's installed.
|
||||
|
||||
You can rename the directories that you downloaded (they
|
||||
might be called "libpng-1.4.0beta18" or "lpng109" and "zlib-1.2.1"
|
||||
might be called "libpng-1.4.0beta19" or "lpng109" and "zlib-1.2.1"
|
||||
or "zlib121") so that you have directories called "zlib" and "libpng".
|
||||
|
||||
Your directory structure should look like this:
|
||||
@ -95,12 +95,15 @@ include
|
||||
CMakeLists.txt => "cmake" script
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||
gcc, creates libpng14.so.1.1.4.0beta18)
|
||||
gcc, creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng14.so.1.1.4.0beta18)
|
||||
(gcc, creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.gcmmx => Linux/ELF makefile
|
||||
(gcc, creates libpng14.so.1.1.4.0beta18,
|
||||
(gcc, creates libpng14.so.1.1.4.0beta19,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.nommx => Linux/ELF makefile
|
||||
(gcc, creates libpng14.so.1.1.4.0beta19
|
||||
does not use Intel MMX assembler code)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
ansi2knr (Requires ansi2knr.c from
|
||||
@ -122,12 +125,12 @@ include
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc,
|
||||
creates libpng14.so.1.1.4.0beta18)
|
||||
creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||
creates libpng14.so.1.1.4.0beta18)
|
||||
creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.so9 => Solaris 9 makefile (gcc,
|
||||
creates libpng14.so.1.1.4.0beta18)
|
||||
creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
|
2
KNOWNBUG
2
KNOWNBUG
@ -1,5 +1,5 @@
|
||||
|
||||
Known bugs in libpng version 1.4.0beta18
|
||||
Known bugs in libpng version 1.4.0beta19
|
||||
|
||||
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
|
||||
reading interlaced PNG files, when assembler code is enabled but running
|
||||
|
6
LICENSE
6
LICENSE
@ -8,8 +8,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.4.0beta18, December 8, 2006, are
|
||||
Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.4.0beta19, May 15, 2007, are
|
||||
Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
|
||||
@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
December 8, 2006
|
||||
May 15, 2007
|
||||
|
36
Makefile.am
36
Makefile.am
@ -8,7 +8,7 @@
|
||||
# -version-number settings below so that the new values have
|
||||
# the correct major part (first field).
|
||||
|
||||
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@
|
||||
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
||||
|
||||
# libpng does not follow GNU file name conventions
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
@ -16,7 +16,7 @@ AUTOMAKE_OPTIONS = foreign
|
||||
# test programs - run on make check, make distcheck
|
||||
check_PROGRAMS= pngtest
|
||||
pngtest_SOURCES = pngtest.c
|
||||
pngtest_LDADD = libpng14.la
|
||||
pngtest_LDADD = $(PNGLIB_BASENAME).la
|
||||
TESTS = test-pngtest.sh
|
||||
TESTS_ENVIRONMENT= srcdir=$(srcdir)
|
||||
|
||||
@ -24,39 +24,39 @@ TESTS_ENVIRONMENT= srcdir=$(srcdir)
|
||||
dist_man_MANS= libpng.3 libpngpf.3 png.5
|
||||
|
||||
# generate the -config scripts if required
|
||||
binconfigs= libpng14-config
|
||||
EXTRA_SCRIPTS= libpng-config libpng14-config
|
||||
binconfigs= $(PNGLIB_BASENAME)-config
|
||||
EXTRA_SCRIPTS= libpng-config $(PNGLIB_BASENAME)-config
|
||||
bin_SCRIPTS= @binconfigs@
|
||||
|
||||
# rules to build libpng, only build the old library on request
|
||||
lib_LTLIBRARIES=libpng14.la @compatlib@
|
||||
lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la @compatlib@
|
||||
EXTRA_LTLIBRARIES= libpng.la
|
||||
libpng14_la_SOURCES = png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c pnggccrd.c \
|
||||
png.h pngconf.h pngdefs.h pngpriv.h
|
||||
libpng_la_SOURCES = $(libpng14_la_SOURCES)
|
||||
libpng_la_SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES)
|
||||
|
||||
libpng_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||
libpng14_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||
|
||||
# MAJOR UPGRADE: the version-number settings below must be changed.
|
||||
libpng14_la_LDFLAGS = -no-undefined -export-dynamic \
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
|
||||
-version-number 1:@PNGLIB_MINOR@:0
|
||||
# -rpath is needed as automake doesn't know the directory
|
||||
libpng_la_LDFLAGS = -rpath '$(libdir)' -no-undefined -export-dynamic \
|
||||
-version-number 14:@PNGLIB_MINOR@:0
|
||||
-version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_MINOR@:0
|
||||
|
||||
if HAVE_LD_VERSION_SCRIPT
|
||||
# Versioned symbols and restricted exports
|
||||
libpng14_la_LDFLAGS += -Wl,--version-script=libpng.vers
|
||||
libpng14_la_DEPENDENCIES = libpng.vers pngdefs.h
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers pngdefs.h
|
||||
else
|
||||
# Only restricted exports when possible
|
||||
libpng14_la_LDFLAGS += -export-symbols libpng.sym pngdefs.h
|
||||
libpng14_la_DEPENDENCIES = libpng.sym
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym pngdefs.h
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
||||
endif
|
||||
libpng_la_DEPENDENCIES = $(libpng14_la_DEPENDENCIES)
|
||||
libpng_la_DEPENDENCIES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES)
|
||||
|
||||
#distribute headers in /usr/include/libpng/*
|
||||
pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
|
||||
@ -65,7 +65,7 @@ pkginclude_HEADERS= png.h pngconf.h pngdefs.h
|
||||
# pkg-config stuff, note that libpng.pc is always required in order
|
||||
# to get the correct library
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
pkgconfig_DATA = libpng14.pc
|
||||
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
|
||||
|
||||
#extra source distribution files.
|
||||
EXTRA_DIST= \
|
||||
@ -85,7 +85,7 @@ EXTRA_DIST= \
|
||||
$(TESTS) \
|
||||
example.c libpng.txt pngvcrd.c
|
||||
|
||||
CLEANFILES= pngout.png libpng14.pc libpng14-config libpng.vers libpng.sym
|
||||
CLEANFILES= pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym
|
||||
|
||||
all: pngdefs.h
|
||||
|
||||
@ -128,7 +128,7 @@ install-data-hook:
|
||||
cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
|
||||
cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
|
||||
|
||||
# do evil things to libpng to cause libpng14 to be used
|
||||
# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(bindir); rm -f libpng-config
|
||||
cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
|
||||
|
14
README
14
README
@ -1,4 +1,4 @@
|
||||
README for libpng version 1.4.0beta18 - December 8, 2006 (shared library 14.0)
|
||||
README for libpng version 1.4.0beta19 - May 15, 2007 (shared library 14.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
@ -184,11 +184,11 @@ Files in this distribution:
|
||||
descrip.mms => VMS makefile for MMS or MMK
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||
gcc, creates libpng14.so.1.1.4.0beta18)
|
||||
gcc, creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng14.so.1.1.4.0beta18)
|
||||
(gcc, creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.gcmmx => Linux/ELF makefile
|
||||
(gcc, creates libpng14.so.1.1.4.0beta18,
|
||||
(gcc, creates libpng14.so.1.1.4.0beta19,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@ -210,12 +210,12 @@ Files in this distribution:
|
||||
makefile.openbsd => OpenBSD makefile
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics
|
||||
(gcc, creates libpng14.so.1.1.4.0beta18)
|
||||
(gcc, creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng14.so.1.1.4.0beta18)
|
||||
(gcc, creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.so9 => Solaris 9 makefile
|
||||
(gcc, creates libpng14.so.1.1.4.0beta18)
|
||||
(gcc, creates libpng14.so.1.1.4.0beta19)
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
makefile.64sunu => Sun Ultra 64-bit makefile
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
|
@ -18,12 +18,12 @@ AC_PREREQ(2.59)
|
||||
|
||||
dnl Version number stuff here:
|
||||
|
||||
AC_INIT([libpng], [1.4.0beta18], [png-mng-implement@lists.sourceforge.net])
|
||||
AC_INIT([libpng], [1.4.0beta19], [png-mng-implement@lists.sourceforge.net])
|
||||
AM_INIT_AUTOMAKE
|
||||
dnl stop configure from automagically running automake
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
PNGLIB_VERSION=1.4.0beta18
|
||||
PNGLIB_VERSION=1.4.0beta19
|
||||
PNGLIB_MAJOR=14
|
||||
PNGLIB_MINOR=0
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.4.0beta18 - December 8, 2006
|
||||
libpng version 1.4.0beta19 - May 15, 2007
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||
@ -2917,13 +2917,13 @@ application:
|
||||
|
||||
IX. Y2K Compliance in libpng
|
||||
|
||||
December 8, 2006
|
||||
May 15, 2007
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.4.0beta18 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.4.0beta19 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
20
libpng.3
20
libpng.3
@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "December 8, 2006"
|
||||
.TH LIBPNG 3 "May 15, 2007"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta18
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta19
|
||||
.SH SYNOPSIS
|
||||
\fB
|
||||
#include <png.h>\fP
|
||||
@ -398,7 +398,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
|
||||
.SH LIBPNG.TXT
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.4.0beta18 - December 8, 2006
|
||||
libpng version 1.4.0beta19 - May 15, 2007
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2005 Glenn Randers-Pehrson
|
||||
@ -3315,13 +3315,13 @@ application:
|
||||
|
||||
.SH IX. Y2K Compliance in libpng
|
||||
|
||||
December 8, 2006
|
||||
May 15, 2007
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.4.0beta18 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.4.0beta19 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
@ -3488,7 +3488,7 @@ the first widely used release:
|
||||
1.2.12 13 10212 12.so.0.12[.0]
|
||||
1.4.0beta9-14 14 10400 14.so.0.0[.0]
|
||||
1.2.13 13 10213 12.so.0.13[.0]
|
||||
1.4.0beta15-16 14 10400 14.so.0.0[.0]
|
||||
1.4.0beta15-19 14 10400 14.so.0.0[.0]
|
||||
|
||||
Henceforth the source version will match the shared-library minor
|
||||
and patch numbers; the shared-library major version number will be
|
||||
@ -3544,7 +3544,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.4.0beta18 - December 8, 2006:
|
||||
Libpng version 1.4.0beta19 - May 15, 2007:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||
|
||||
@ -3565,8 +3565,8 @@ included in the libpng distribution, the latter shall prevail.)
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.4.0beta18, December 8, 2006, are
|
||||
Copyright (c) 2004-2006 Glenn Randers-Pehrson, and are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.4.0beta19, May 15, 2007, are
|
||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
|
||||
@ -3664,7 +3664,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
December 8, 2006
|
||||
May 15, 2007
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
.TH LIBPNGPF 3 "December 8, 2006"
|
||||
.TH LIBPNGPF 3 "May 15, 2007"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta18
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta19
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "December 8, 2006"
|
||||
.TH PNG 5 "May 15, 2007"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
10
png.c
10
png.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* Last changed in libpng 1.4.0 November 14, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
@ -13,7 +13,7 @@
|
||||
#include "pngpriv.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_4_0beta18 Your_png_h_is_not_version_1_4_0beta18;
|
||||
typedef version_1_4_0beta19 Your_png_h_is_not_version_1_4_0beta19;
|
||||
|
||||
/* Version information for C files. This had better match the version
|
||||
* string defined in png.h. */
|
||||
@ -643,8 +643,8 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return ((png_charp) "\n libpng version 1.4.0beta18 - December 8, 2006\n\
|
||||
Copyright (c) 1998-2006 Glenn Randers-Pehrson\n\
|
||||
return ((png_charp) "\n libpng version 1.4.0beta19 - May 15, 2007\n\
|
||||
Copyright (c) 1998-2007 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
return ((png_charp) "");
|
||||
|
24
png.h
24
png.h
@ -1,15 +1,15 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.4.0beta18 - December 8, 2006
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* libpng version 1.4.0beta19 - May 15, 2007
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
* Authors and maintainers:
|
||||
* 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.97, January 1998, through 1.4.0beta18 - December 8, 2006: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.4.0beta19 - May 15, 2007: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -126,7 +126,7 @@
|
||||
* 1.2.12 13 10212 12.so.0.10[.0]
|
||||
* 1.4.0beta9-14 14 10400 14.so.0.0[.0]
|
||||
* 1.2.13 13 10213 12.so.0.10[.0]
|
||||
* 1.4.0beta15-16 14 10400 14.so.0.0[.0]
|
||||
* 1.4.0beta15-19 14 10400 14.so.0.0[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -156,8 +156,8 @@
|
||||
* If you modify libpng you may insert additional notices immediately following
|
||||
* this sentence.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.4.0beta18, December 8, 2006, are
|
||||
* Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.4.0beta19, May 15, 2007, are
|
||||
* Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
* with the following individual added to the list of Contributing Authors:
|
||||
*
|
||||
@ -268,13 +268,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* December 8, 2006
|
||||
* May 15, 2007
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
*
|
||||
* This is your unofficial assurance that libpng from version 0.71 and
|
||||
* upward through 1.4.0beta18 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.4.0beta19 are Y2K compliant. It is my belief that earlier
|
||||
* versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
@ -330,9 +330,9 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.4.0beta18"
|
||||
#define PNG_LIBPNG_VER_STRING "1.4.0beta19"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.4.0beta18 - December 8, 2006 (header)\n"
|
||||
" libpng version 1.4.0beta19 - May 15, 2007 (header)\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 1
|
||||
#define PNG_LIBPNG_VER_DLLNUM 14
|
||||
@ -344,7 +344,7 @@
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 18
|
||||
#define PNG_LIBPNG_VER_BUILD 19
|
||||
|
||||
/* Release Status */
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
@ -1343,7 +1343,7 @@ struct png_struct_def
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef png_structp version_1_4_0beta18;
|
||||
typedef png_structp version_1_4_0beta19;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.4.0beta18 - December 8, 2006
|
||||
* libpng version 1.4.0beta19 - May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.4.0 November 14, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
@ -7,9 +7,9 @@
|
||||
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
|
||||
* for Intel's performance analysis of the MMX vs. non-MMX code.
|
||||
*
|
||||
* Last changed in libpng 1.4.0 August 3, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
*
|
||||
* Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998.
|
||||
|
4
pngget.c
4
pngget.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* Last changed in libpng 1.4.0 April 20, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
4
pngmem.c
4
pngmem.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngmem.c - stub functions for memory allocation
|
||||
*
|
||||
* Last changed in libpng 1.4.0 November 14, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* Last changed in libpng 1.4.0 November 14, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngpriv.h - private declarations for use inside libpng
|
||||
*
|
||||
* libpng version 1.4.0beta18 - December 8, 2006
|
||||
* libpng version 1.4.0beta19 - May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.4.0 November 14, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
4
pngrio.c
4
pngrio.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* Last changed in libpng 1.4.0 November 14, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.4.0 November 14, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.4.0 November 14, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -1325,7 +1325,10 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
}
|
||||
|
||||
if (png_crc_finish(png_ptr, 0))
|
||||
{
|
||||
png_ptr->num_trans = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans,
|
||||
&(png_ptr->trans_values));
|
||||
|
5
pngset.c
5
pngset.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.4.0 April 20, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -883,7 +883,6 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
|
||||
textp->itxt_length = 0;
|
||||
#endif
|
||||
}
|
||||
info_ptr->text[info_ptr->num_text]= *textp;
|
||||
info_ptr->num_text++;
|
||||
png_debug1(3, "transferred text chunk %d\n", info_ptr->num_text);
|
||||
}
|
||||
|
38
pngtest.c
38
pngtest.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngtest.c - a simple test program to test libpng
|
||||
*
|
||||
* Last changed in libpng 1.4.0 April 20, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -52,6 +52,11 @@
|
||||
# define SINGLE_ROWBUF_ALLOC /* makes buffer overruns easier to nail */
|
||||
#endif
|
||||
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
static int tIME_chunk_present=0;
|
||||
static char tIME_string[30] = "no tIME chunk present in file";
|
||||
#endif
|
||||
|
||||
/* Turn on CPU timing
|
||||
#define PNGTEST_TIMING
|
||||
*/
|
||||
@ -65,23 +70,6 @@ static float t_start, t_stop, t_decode, t_encode, t_misc;
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
||||
#ifndef png_jmpbuf
|
||||
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
||||
#endif
|
||||
|
||||
#ifdef PNGTEST_TIMING
|
||||
static float t_start, t_stop, t_decode, t_encode, t_misc;
|
||||
#if !defined(PNG_tIME_SUPPORTED)
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_TIME_RFC1123_SUPPORTED)
|
||||
static int tIME_chunk_present=0;
|
||||
static char tIME_string[30] = "no tIME chunk present in file";
|
||||
#endif
|
||||
|
||||
static int verbose = 0;
|
||||
|
||||
int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname));
|
||||
@ -94,6 +82,16 @@ int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname));
|
||||
/* #define STDERR stderr */
|
||||
#define STDERR stdout /* for DOS */
|
||||
|
||||
/* In case a system header (e.g., on AIX) defined jmpbuf */
|
||||
#ifdef jmpbuf
|
||||
# undef jmpbuf
|
||||
#endif
|
||||
|
||||
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
||||
#ifndef png_jmpbuf
|
||||
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
|
||||
#endif
|
||||
|
||||
/* example of using row callbacks to make a simple progress meter */
|
||||
static int status_pass=1;
|
||||
static int status_dots_requested=0;
|
||||
@ -1598,4 +1596,4 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_4_0beta18 your_png_h_is_not_version_1_4_0beta18;
|
||||
typedef version_1_4_0beta19 your_png_h_is_not_version_1_4_0beta19;
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* Last changed in libpng 1.4.0 April 20, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -3,9 +3,9 @@
|
||||
*
|
||||
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
||||
*
|
||||
* Last changed in libpng 1.4.0 April 20, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
*
|
||||
* Contributed by Nirav Chhatrapati, Intel Corporation, 1998
|
||||
|
4
pngwio.c
4
pngwio.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* Last changed in libpng 1.4.0 April 20, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.4.0 April 20, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.4.0 July 20, 2006
|
||||
* Last changed in libpng 1.4.0 May 15, 2007
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998-2006 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -1,149 +1,212 @@
|
||||
project(PNG)
|
||||
|
||||
project(libpng)
|
||||
# Copyright (C) 2007 Glenn Randers-Pehrson
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
SET(PNG_VER_MAJOR 1)
|
||||
SET(PNG_VER_MINOR 4)
|
||||
SET(PNG_VER_PATCH 0)
|
||||
set(PNGLIB_MAJOR 1)
|
||||
set(PNGLIB_MINOR 4)
|
||||
set(PNGLIB_RELEASE 0)
|
||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||
|
||||
# needed packages
|
||||
find_package(ZLIB REQUIRED)
|
||||
if(NOT WIN32)
|
||||
find_library(M_LIBRARY
|
||||
NAMES m
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
if(NOT M_LIBRARY)
|
||||
message(STATUS
|
||||
"math library 'libm' not found - floating point support disabled")
|
||||
endif(NOT M_LIBRARY)
|
||||
else(NOT WIN32)
|
||||
# not needed on windows
|
||||
set(M_LIBRARY "")
|
||||
endif(NOT WIN32)
|
||||
|
||||
|
||||
# command line options
|
||||
# COMMAND LINE OPTIONS
|
||||
option(PNG_SHARED "Build shared lib" YES)
|
||||
option(PNG_STATIC "Build static lib" YES)
|
||||
option(PNG_TESTS "Build pngtest" YES)
|
||||
option(PNG_NO_CONSOLE_IO "FIXME" YES)
|
||||
option(PNG_NO_STDIO "FIXME" YES)
|
||||
option(PNG_DEBUG "Build with debug output" YES)
|
||||
option(PNGARG "FIXME" YES)
|
||||
#TODO:
|
||||
# PNG_NO_CONSOLE_IO
|
||||
# PNG_NO_STDIO
|
||||
# PNG_CONSOLE_IO_SUPPORTED
|
||||
# PNGARG
|
||||
# some others :)
|
||||
|
||||
# maybe needs improving, but currently I don't know when we can enable what :)
|
||||
set(png_asm_tmp "OFF")
|
||||
if(NOT WIN32)
|
||||
find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
|
||||
if(uname_executable)
|
||||
EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
|
||||
if("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
set(png_asm_tmp "ON")
|
||||
else("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
set(png_asm_tmp "OFF")
|
||||
endif("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
endif(uname_executable)
|
||||
find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
|
||||
if(uname_executable)
|
||||
EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
|
||||
if("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
set(png_asm_tmp "ON")
|
||||
else("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
set(png_asm_tmp "OFF")
|
||||
endif("uname_output" MATCHES "^.*i[1-9]86.*$")
|
||||
endif(uname_executable)
|
||||
endif(NOT WIN32)
|
||||
|
||||
option(PNG_MMX "Use MMX assembler code (x86 only)" ${png_asm_tmp})
|
||||
|
||||
|
||||
# SET LIBNAME
|
||||
# msvc does not append 'lib' - do it here to have consistent name
|
||||
if(MSVC)
|
||||
set(PNG_LIB_NAME lib)
|
||||
set(PNG_LIB_NAME lib)
|
||||
endif(MSVC)
|
||||
#set(PNG_LIB_NAME ${PNG_LIB_NAME}png-${PNG_VER_MAJOR}.${PNG_VER_MINOR})
|
||||
set(PNG_LIB_NAME ${PNG_LIB_NAME}png)
|
||||
set(PNG_LIB_NAME ${PNG_LIB_NAME}png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
|
||||
# to distinguish between debug and release lib
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
# append _static to static lib
|
||||
if(NOT PNG_SHARED)
|
||||
set(PNG_LIB_NAME ${PNG_LIB_NAME}_static)
|
||||
endif(NOT PNG_SHARED)
|
||||
|
||||
|
||||
# our sources
|
||||
# OUR SOURCES
|
||||
set(libpng_sources
|
||||
png.h
|
||||
pngconf.h
|
||||
pngdefs.h
|
||||
pngpriv.h
|
||||
png.c
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c
|
||||
png.h
|
||||
pngconf.h
|
||||
png.c
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c
|
||||
)
|
||||
set(pngtest_sources
|
||||
pngtest.c
|
||||
pngtest.c
|
||||
)
|
||||
|
||||
# SOME NEEDED DEFINITIONS
|
||||
add_definitions(-DZLIB_DLL)
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
|
||||
FILE(WRITE pngdefs.h "#define PNG_USE_PNGVCRD\n")
|
||||
set(libpng_sources ${libpng_sources}
|
||||
pngvcrd.c
|
||||
)
|
||||
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
|
||||
FILE(WRITE pngdefs.h "#define PNG_USE_PNGVCRD\n")
|
||||
set(libpng_sources ${libpng_sources}
|
||||
pngvcrd.c
|
||||
)
|
||||
else(MSVC)
|
||||
FILE(WRITE pngdefs.h "#define PNG_USE_PNGGCCRD\n")
|
||||
FILE(APPEND pngdefs.h "#define PNG_USE_GLOBAL_ARRAYS\n")
|
||||
set(libpng_sources ${libpng_sources}
|
||||
pnggccrd.c
|
||||
)
|
||||
FILE(WRITE pngdefs.h "#define PNG_USE_PNGGCCRD\n")
|
||||
set(libpng_sources ${libpng_sources}
|
||||
pnggccrd.c
|
||||
)
|
||||
endif(MSVC)
|
||||
|
||||
if(NOT PNG_MMX)
|
||||
if(NOT MSVC)
|
||||
if(NOT PNG_MMX)
|
||||
FILE(APPEND pngdefs.h "#define PNG_NO_MMX_CODE\n")
|
||||
endif(NOT PNG_MMX)
|
||||
endif(NOT PNG_MMX)
|
||||
else(NOT MSVC)
|
||||
if(PNG_MMX)
|
||||
# maybe add this to pngconf.h ?
|
||||
FILE(APPEND pngdefs.h "#define PNG_MMX_MMX_CODE_SUPPORTED\n")
|
||||
endif(PNG_MMX)
|
||||
endif(NOT MSVC)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_library(M_LIBRARY
|
||||
NAMES m
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
endif(NOT WIN32)
|
||||
|
||||
# now build our target
|
||||
include_directories(${CMAKE_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||
if(PNG_CONSOLE_IO_SUPPORTED)
|
||||
add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
|
||||
endif(PNG_CONSOLE_IO_SUPPORTED)
|
||||
|
||||
if(PNG_NO_CONSOLE_IO)
|
||||
add_definitions(-DPNG_NO_CONSOLE_IO)
|
||||
endif(PNG_NO_CONSOLE_IO)
|
||||
|
||||
if(PNG_NO_STDIO)
|
||||
add_definitions(-DPNG_NO_STDIO)
|
||||
endif(PNG_NO_STDIO)
|
||||
|
||||
if(PNG_DEBUG)
|
||||
add_definitions(-DPNG_DEBUG)
|
||||
endif(PNG_DEBUG)
|
||||
|
||||
if(NOT M_LIBRARY)
|
||||
add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
|
||||
endif(NOT M_LIBRARY)
|
||||
|
||||
# NOW BUILD OUR TARGET
|
||||
include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
if(PNG_SHARED)
|
||||
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
|
||||
else(PNG_SHARED)
|
||||
add_library(STATIC ${libpng_sources})
|
||||
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
|
||||
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
|
||||
endif(PNG_SHARED)
|
||||
if(PNG_STATIC)
|
||||
# does not work without changing name
|
||||
set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
|
||||
add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
|
||||
endif(PNG_STATIC)
|
||||
|
||||
target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
|
||||
if(PNG_SHARED AND WIN32)
|
||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
|
||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
|
||||
endif(PNG_SHARED AND WIN32)
|
||||
|
||||
if(PNG_TESTS)
|
||||
# does not work with msvc due to png_lib_ver issue
|
||||
add_executable(pngtest ${pngtest_sources})
|
||||
target_link_libraries(pngtest ${PNG_LIB_NAME})
|
||||
# add_test(pngtest ${CMAKE_SOURCE_DIR}/pngtest.png)
|
||||
add_executable(pngtest ${pngtest_sources})
|
||||
target_link_libraries(pngtest ${PNG_LIB_NAME})
|
||||
# add_test(pngtest ${PNG_SOURCE_DIR}/pngtest.png)
|
||||
endif(PNG_TESTS)
|
||||
|
||||
|
||||
# install
|
||||
install_targets(/bin ${PNG_LIB_NAME})
|
||||
install(FILES libpng.so DESTINATION lib)
|
||||
# CREATE PKGCONFIG FILES
|
||||
# we use the same files like ./configure, so we have to set its vars
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
|
||||
configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
|
||||
${PNG_BINARY_DIR}/libpng.pc)
|
||||
configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
|
||||
${PNG_BINARY_DIR}/libpng-config)
|
||||
configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
|
||||
${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc)
|
||||
configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
|
||||
${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
|
||||
|
||||
# SET UP LINKS
|
||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||
# VERSION 0.${PNGLIB_RELEASE}.1.4.0beta19
|
||||
VERSION 0.${PNGLIB_RELEASE}.0
|
||||
SOVERSION 0
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
|
||||
OUTPUT_NAME ${PNG_LIB_NAME}
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
# INSTALL
|
||||
install_targets(/lib ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC})
|
||||
install(FILES png.h pngconf.h pngpriv.h pngdefs.h DESTINATION include)
|
||||
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
|
||||
install(FILES png.h pngconf.h pngpriv.h pngdefs.h DESTINATION include/${PNGLIB_NAME})
|
||||
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
|
||||
install(FILES png.5 DESTINATION man/man5)
|
||||
install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
|
||||
install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
|
||||
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
|
||||
install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
|
||||
|
||||
# what's with libpng.txt and all the extra files?
|
||||
|
||||
|
||||
# uninstall
|
||||
# UNINSTALL
|
||||
# do we need this?
|
||||
|
||||
|
||||
# dist
|
||||
# DIST
|
||||
# do we need this?
|
||||
|
||||
# to create msvc import lib for mingw compiled shared lib
|
||||
# pexports libpng.dll > libpng.def
|
||||
# lib /def:libpng.def /machine:x86
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
version=1.4.0beta18
|
||||
version=1.4.0beta19
|
||||
prefix=""
|
||||
libdir=""
|
||||
libs=""
|
||||
|
@ -12,9 +12,9 @@ version="@PNGLIB_VERSION@"
|
||||
prefix="@prefix@"
|
||||
exec_prefix="@exec_prefix@"
|
||||
libdir="@libdir@"
|
||||
includedir="@includedir@/libpng@PNGLIB_MAJOR@"
|
||||
libs="-lpng@PNGLIB_MAJOR@"
|
||||
all_libs="-lpng@PNGLIB_MAJOR@ -lz -lm"
|
||||
includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
||||
libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
|
||||
all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ -lz -lm"
|
||||
I_opts="-I${includedir}"
|
||||
L_opts="-L${libdir}"
|
||||
R_opts=""
|
||||
|
@ -5,6 +5,6 @@ includedir=@includedir@/libpng14
|
||||
|
||||
Name: libpng
|
||||
Description: Loads and saves PNG files
|
||||
Version: 1.4.0beta18
|
||||
Version: 1.4.0beta19
|
||||
Libs: -L${libdir} -lpng14
|
||||
Cflags: -I${includedir}
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -20,7 +20,7 @@ LN_SF = ln -f -s
|
||||
|
||||
LIBNAME=libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
prefix=/usr/local
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -65,7 +65,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
CYGDLL = 14
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=cygpng$(CYGDLL).dll
|
||||
|
@ -19,7 +19,7 @@ ZLIBINC=../zlib
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
# Library name:
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng14
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -16,7 +16,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
@ -106,7 +106,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config \
|
||||
pngconf.h pngdefs.h
|
||||
|
||||
# Use makefile.gcmmx if you don't want to use the MMX assembler code.
|
||||
# Use makefile.gcmmx if you want to use the MMX assembler code.
|
||||
# If you don't need thread safety you can uncomment the define.
|
||||
pngdefs.h:
|
||||
echo "/* pngdefs.h was built by makefile.gcmmx */" > pngdefs.h
|
||||
|
@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -6,7 +6,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -62,7 +62,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
MINGDLL = 14
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=libpng$(MINGDLL).dll
|
||||
|
@ -14,7 +14,7 @@ INCSDIR=${LOCALBASE}/include/libpng14
|
||||
|
||||
LIB= png14
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.4.0beta18
|
||||
SHLIB_MINOR= 1.4.0beta19
|
||||
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||
|
@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng
|
||||
|
||||
LIB= png
|
||||
SHLIB_MAJOR= 3
|
||||
SHLIB_MINOR= 1.4.0beta18
|
||||
SHLIB_MINOR= 1.4.0beta19
|
||||
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||
|
266
scripts/makefile.nommx
Normal file
266
scripts/makefile.nommx
Normal file
@ -0,0 +1,266 @@
|
||||
# makefile for libpng.a and libpng14.so on Linux ELF with gcc using MMX
|
||||
# assembler code
|
||||
# Copyright 2002, 2006 Greg Roelofs and Glenn Randers-Pehrson
|
||||
# Copyright 1998-2001 Greg Roelofs
|
||||
# Copyright 1996-1997 Andreas Dilger
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
|
||||
|
||||
# WARNING: The assembler code in pnggccrd.c may not be thread safe.
|
||||
|
||||
# NOTE: When testing MMX performance on a multitasking system, make sure
|
||||
# there are no floating-point programs (e.g., SETI@Home) running in
|
||||
# the background! Context switches between MMX and FPU are expensive.
|
||||
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
LIBSO=$(LIBNAME).so
|
||||
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
|
||||
LIBSOVER=$(LIBNAME).so.$(PNGVER)
|
||||
OLDSO=libpng.so
|
||||
|
||||
# Utilities:
|
||||
CC = gcc
|
||||
LD = $(CC)
|
||||
AR_RC = ar rc
|
||||
LN_SF = ln -sf
|
||||
MKDIR_P = mkdir -p
|
||||
RANLIB = ranlib
|
||||
RM_F = /bin/rm -f
|
||||
|
||||
# where "make install" puts libpng14.a, libpng14.so*,
|
||||
# libpng14/png.h and libpng14/pngconf.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= -I$(ZLIBINC) -Wall \
|
||||
-O3 $(ALIGN) -funroll-loops \
|
||||
-fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
### for gcc 2.95.2 on 686:
|
||||
#CFLAGS= -I$(ZLIBINC) -Wall -O3 \
|
||||
# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \
|
||||
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
||||
### for gcc 2.7.2.3 on 486 and up:
|
||||
#CFLAGS= -I$(ZLIBINC) -Wall -O3 \
|
||||
# -m486 -malign-double -ffast-math \
|
||||
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
||||
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
|
||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -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 pnggccrd.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 \
|
||||
pngconf.h pngdefs.h
|
||||
|
||||
# Use makefile.gcmmx if you want to use the MMX assembler code.
|
||||
pngdefs.h:
|
||||
echo "/* pngdefs.h was built by makefile.nommx */" > pngdefs.h
|
||||
echo "#define PNG_NO_MMX_CODE" >> pngdefs.h
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
$(AR_RC) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
libpng.pc:
|
||||
cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
|
||||
|
||||
libpng-config:
|
||||
( cat scripts/libpng-config-head.in; \
|
||||
echo prefix=\"$(prefix)\"; \
|
||||
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
|
||||
echo cppflags=""; \
|
||||
echo L_opts=\"-L$(LIBPATH)\"; \
|
||||
echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
|
||||
echo libs=\"-lpng14 -lz -lm\"; \
|
||||
cat scripts/libpng-config-body.in ) > libpng-config
|
||||
chmod +x libpng-config
|
||||
|
||||
pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) -o $@ $*.c
|
||||
|
||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
|
||||
|
||||
$(LIBSO): $(LIBSOMAJ)
|
||||
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
|
||||
|
||||
$(LIBSOMAJ): $(LIBSOVER)
|
||||
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
|
||||
|
||||
$(LIBSOVER): $(OBJSDLL)
|
||||
$(CC) -shared -Wl,-soname,$(LIBSOMAJ) \
|
||||
-o $(LIBSOVER) \
|
||||
$(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 ""
|
||||
./pngtest
|
||||
@echo ""
|
||||
@echo " Running pngtest statically linked with libpng.a:"
|
||||
@echo ""
|
||||
./pngtest-static
|
||||
|
||||
install-headers: png.h pngconf.h pngdefs.h
|
||||
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
|
||||
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
|
||||
cp png.h pngconf.h pngdefs.h $(DI)/$(LIBNAME)
|
||||
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h \
|
||||
$(DI)/$(LIBNAME)/pngdefs.h
|
||||
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pngdefs.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 $(LIBSOVER) libpng.pc
|
||||
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
|
||||
-@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
|
||||
-@$(RM_F) $(DL)/$(LIBSOMAJ)
|
||||
-@$(RM_F) $(DL)/$(OLDSO)
|
||||
cp $(LIBSOVER) $(DL)
|
||||
chmod 755 $(DL)/$(LIBSOVER)
|
||||
(cd $(DL); \
|
||||
$(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
|
||||
$(LN_SF) $(LIBSOMAJ) $(LIBSO); \
|
||||
$(LN_SF) $(OLDSO) $(LIBSO))
|
||||
-@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 pngtest pngout.png libpng-config pngdefs.h \
|
||||
$(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
|
||||
libpng.pc
|
||||
|
||||
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
chmod a-w *.[ch35] $(DOCS) scripts/*
|
||||
|
||||
png.o png.pic.o: png.h pngconf.h pngdefs.h pngpriv.h png.c
|
||||
pngerror.o pngerror.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngerror.c
|
||||
pngrio.o pngrio.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngrio.c
|
||||
pngwio.o pngwio.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngwio.c
|
||||
pngmem.o pngmem.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngmem.c
|
||||
pngset.o pngset.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngset.c
|
||||
pngget.o pngget.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngget.c
|
||||
pngread.o pngread.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngread.c
|
||||
pngrtran.o pngrtran.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngrtran.c
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngrutil.c
|
||||
pngtrans.o pngtrans.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngtrans.c
|
||||
pngwrite.o pngwrite.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngwrite.c
|
||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngwtran.c
|
||||
pngwutil.o pngwutil.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngwutil.c
|
||||
pngpread.o pngpread.pic.o: png.h pngconf.h pngdefs.h pngpriv.h pngpread.c
|
||||
|
||||
pngtest.o: png.h pngconf.h pngdefs.h pngtest.c
|
@ -8,7 +8,7 @@ LIBDIR= ${PREFIX}/lib
|
||||
MANDIR= ${PREFIX}/man/cat
|
||||
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.4.0beta18
|
||||
SHLIB_MINOR= 1.4.0beta19
|
||||
|
||||
LIB= png
|
||||
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
|
||||
|
@ -9,7 +9,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -6,7 +6,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -6,7 +6,7 @@
|
||||
# Library name:
|
||||
LIBNAME=libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
# Library name:
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
LIBNAME = libpng14
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Library name:
|
||||
LIBNAME = libpng14
|
||||
PNGMAJ = 1
|
||||
PNGMIN = 1.4.0beta18
|
||||
PNGMIN = 1.4.0beta19
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# Shared library names:
|
||||
|
@ -2,7 +2,7 @@
|
||||
; PNG.LIB module definition file for OS/2
|
||||
;----------------------------------------
|
||||
|
||||
; Version 1.4.0beta18
|
||||
; Version 1.4.0beta19
|
||||
|
||||
LIBRARY PNG
|
||||
DESCRIPTION "PNG image compression library for OS/2"
|
||||
|
@ -5,7 +5,7 @@
|
||||
LIBRARY
|
||||
|
||||
EXPORTS
|
||||
;Version 1.4.0beta18
|
||||
;Version 1.4.0beta19
|
||||
png_build_grayscale_palette
|
||||
png_chunk_error
|
||||
png_chunk_warning
|
||||
|
Loading…
Reference in New Issue
Block a user