提交 0da9cf38 编写于 作者: G Glenn Randers-Pehrson

[master] Imported from libpng-1.6.0.tar

上级 d14caad2
此差异已折叠。
此差异已折叠。
......@@ -34,8 +34,8 @@ project(libpng C)
enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 5)
set(PNGLIB_RELEASE 14)
set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 0)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
......@@ -123,10 +123,11 @@ set(pngtest_sources
set(pngvalid_sources
contrib/libtests/pngvalid.c
)
set(pngstest_sources
contrib/libtests/pngstest.c
)
# SOME NEEDED DEFINITIONS
add_definitions(-DPNG_CONFIGURE_LIBPNG)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC)
......@@ -172,6 +173,40 @@ if(PNG_TESTS AND PNG_SHARED)
add_executable(pngvalid ${pngvalid_sources})
target_link_libraries(pngvalid ${PNG_LIB_NAME})
add_test(pngvalid ./pngvalid)
add_executable(pngstest ${pngstest_sources})
target_link_libraries(pngstest ${PNG_LIB_NAME})
add_test(pngstest ./pngstest
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g01.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g02.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g04.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn0g16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn2c08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn2c16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p01.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p02.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p04.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn4a08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn4a16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn6a08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/basn6a16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g01.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g02.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn0g04.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn2c16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbbn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbgn2c16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbgn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbrn2c08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbwn0g16.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbwn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftbyn3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n0g08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n2c08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp0n3p08.png
${CMAKE_CURRENT_SOURCE_DIR}/contrib/pngsuite/ftp1n3p08.png
)
endif()
# Ensure the CMAKE_LIBRARY_OUTPUT_DIRECTORY is set
......@@ -207,7 +242,7 @@ endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
# we use the same files like ./configure, so we have to set its vars
# Only do this on Windows for Cygwin - the files don't make much sense outside
# a UNIX look alike
if(NOT WIN32 OR CYGWIN OR MINGW)
if(NOT WIN32 OR CYGWIN OR MINGW)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
......@@ -225,9 +260,9 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 15.${PNGLIB_RELEASE}.1.5.14
VERSION 15.${PNGLIB_RELEASE}.0
SOVERSION 15
# VERSION 16.${PNGLIB_RELEASE}.1.6.0
VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16
CLEAN_DIRECT_OUTPUT 1)
endif()
if(PNG_STATIC)
......@@ -259,7 +294,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
# Create a symlink for libpng.dll.a => libpng15.dll.a on Cygwin
# Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
if(CYGWIN OR MINGW)
get_target_property(BUILD_TARGET_LOCATION ${PNG_LIB_NAME} LOCATION_${CMAKE_BUILD_TYPE})
get_filename_component(BUILD_TARGET_FILE ${BUILD_TARGET_LOCATION} NAME)
......
......@@ -9,16 +9,16 @@ On Unix/Linux and similar systems, you can simply type
and ignore the rest of this document.
If configure does not work on your system and you have a reasonably
up-to-date set of tools, running ./autogen.sh before running ./configure
may fix the problem. You can also run the individual commands in
autogen.sh with the --force option, if supported by your version of
the tools. To be really sure that you aren't using any of the included
pre-built scripts, you can do this:
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
up-to-date set of tools, running ./autogen.sh in a git clone before
running ./configure may fix the problem. To be really sure that you
aren't using any of the included pre-built scripts, you can do this:
./configure --enable-maintainer-mode
make maintainer-clean
./autogen.sh
./autogen.sh --maintainer --clean
./autogen.sh --maintainer
./configure [--prefix=/path] [other options]
make
make install
......
......@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.14, January 24, 2013, are
libpng versions 1.2.6, August 15, 2004, through 1.6.0, February 14, 2013, are
Copyright (c) 2004, 2006-2012 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
......@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
January 24, 2013
February 14, 2013
......@@ -4,12 +4,7 @@
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
# libpng does not follow GNU file name conventions
# "color-tests" requires automake 1.11.1 or later. Enable it if you like,
# to get red "FAIL" and green "PASS" notations during tests.
# AUTOMAKE_OPTIONS = foreign color-tests
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I scripts
# test programs - run on make check, make distcheck
TESTS_ENVIRONMENT= srcdir=$(srcdir)
......@@ -19,10 +14,17 @@ pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS = test-pngtest.sh
# Only do the following if the contrib directory is present.
check_PROGRAMS+= pngvalid
check_PROGRAMS+= pngvalid pngstest pngunknown
pngvalid_SOURCES = contrib/libtests/pngvalid.c
pngstest_SOURCES = contrib/libtests/pngstest.c
pngunknown_SOURCES = contrib/libtests/pngunknown.c
pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS += test-pngvalid-simple.sh test-pngvalid-full.sh
pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
TESTS += contrib/libtests/test-pngunknown.sh\
contrib/libtests/test-pngvalid-simple.sh\
contrib/libtests/test-pngvalid-full.sh\
contrib/libtests/test-pngstest.sh
# man pages
dist_man_MANS= libpng.3 libpngpf.3 png.5
......@@ -47,8 +49,6 @@ endif
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
-version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0
......@@ -87,14 +87,20 @@ EXTRA_DIST= \
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.dfn
CLEANFILES= dfn.c dfn?.out pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
check.new pnglibconf.* symbols.new pngtest-log.txt \
check.new pnglibconf.* pngprefix.h symbols.new pngtest-log.txt \
$(SCRIPT_CLEANFILES)
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh ltmain.sh missing
# PNG_COPTS give extra options for the C compiler to be used on all compilation
# steps (unless targe_CFLAGS is specified; that will take precedence over
# AM_CFLAGS)
PNG_COPTS = @PNG_COPTS@
AM_CFLAGS = ${PNG_COPTS}
# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe
# other operating systems (NeXT?) the C preprocessor selected by configure
# checks input tokens for validity - effectively it performs part of the ANSI-C
......@@ -111,7 +117,9 @@ $(PNGLIB_BASENAME)-config: libpng-config
cp libpng-config $@
scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h
scripts/prefix.out: png.h pngconf.h pnglibconf.out
scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt
scripts/intprefix.out: pnglibconf.h
libpng.sym: scripts/sym.out
rm -f $@
......@@ -119,9 +127,34 @@ libpng.sym: scripts/sym.out
libpng.vers: scripts/vers.out
rm -f $@
cp $? $@
if DO_PNG_PREFIX
# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix.
# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual
# implementation of the macro).
pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst
rm -f $@
$(AWK) 's==0 && NR>1{print prev}\
s==0{prev=$$0}\
s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\
s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\
END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\
s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8
mv pnglibconf.tf8 $@
pngprefix.h: scripts/intprefix.out
rm -f pngprefix.tf1
$(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1
mv pngprefix.tf1 $@
else
pnglibconf.h: pnglibconf.out
rm -f $@
cp $? $@
pngprefix.h: # is empty
:>$@
endif
$(srcdir)/scripts/pnglibconf.h.prebuilt:
@echo "Attempting to build $@" >&2
@echo "This is a machine generated file, but if you want to make" >&2
......@@ -131,7 +164,8 @@ $(srcdir)/scripts/pnglibconf.h.prebuilt:
# The following is necessary to ensure that the local pnglibconf.h is used, not
# an installed one (this can happen immediately after on a clean system if
# 'make test' is the first thing the user does.)
contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
contrib/libtests/pngstest.o contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
contrib/libtests/pngunknown.o: pnglibconf.h
# 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
......@@ -141,51 +175,57 @@ SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
-DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\
-DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE
if DO_PNG_PREFIX
SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@'
endif
.dfn.out:
rm -f $@ dfn.c dfn?.out
rm -f $@ $*.c $*.tf[123]
test -d scripts || mkdir scripts
echo '#include "$<"' >dfn.c
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
echo '#include "$<"' >$*.c
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\
$(CPPFLAGS) $(SYMBOL_CFLAGS) $*.c > $*.tf1
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
dfn1.out >dfn2.out
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' dfn2.out >dfn3.out
rm -f dfn.c dfn[12].out
mv dfn3.out $@
$*.tf1 >$*.tf2
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' $*.tf2 >$*.tf3
rm -f $*.c $*.tf[12]
mv $*.tf3 $@
# 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 $@ dfn?.out
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out version=search\
rm -f $@ $*.tf[45]
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
rm dfn1.out
mv dfn2.out $@
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2
rm $*.tf4
mv $*.tf5 $@
# Symbol checks (.def and .out files should match)
scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
.out.chk:
rm -f $@ symbols.new
rm -f $@ $*.new
$(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
$< >&2
mv symbols.new $@
of="$*.new" $< >&2
mv $*.new $@
# used on demand to regenerate the standard header, CPPFLAGS should
# be empty - no non-standard defines
scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
rm -f $@ dfn?.out
rm -f $@ pnglibconf.tf[67]
test -z "$(CPPFLAGS)"
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn1.out logunsupported=1
version=search ${srcdir}/pngconf.h -\
${srcdir}/scripts/pnglibconf.dfa 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=dfn2.out dfn1.out 1>&2
rm dfn1.out
mv dfn2.out $@
$(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\
logunsupported=1 version=search ${srcdir}/pngconf.h -\
${srcdir}/scripts/pnglibconf.dfa 1>&2
$(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\
pnglibconf.tf6 1>&2
rm pnglibconf.tf6
mv pnglibconf.tf7 $@
$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h
pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h
test: check-am
......
此差异已折叠。
README for libpng version 1.5.14 - January 24, 2013 (shared library 15.0)
README for libpng version 1.6.0 - February 14, 2013 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
......@@ -105,7 +105,7 @@ based in a large way on Guy's and Andreas' earlier work), and the PNG
development group.
Send comments/corrections/commendations to png-mng-implement at
lists.sourceforge.net (subscription required; visit
lists.sourceforge.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
......
此差异已折叠。
/* arm_init.c - NEON optimised filter functions
*
* Copyright (c) 2013 Glenn Randers-Pehrson
* Copyright (c) 2012 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
* Last changed in libpng 1.5.14 [(PENDING RELEASE)]
*
......
#! /bin/sh
# a quick hack script to generate necessary files from
# auto* tools.
#
# WARNING: if you run this you will change the versions
# of the tools which are used and, maybe, required!
# You can define your own replacements in your environment.
# $AUTOCONF, $AUTOMAKE, $AUTOHEADER, $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE
touch Makefile.am configure.ac
{
LT=${LIBTOOLIZE-libtoolize}
echo "running $LT" >&2
$LT --force --copy --automake
} && {
AL=${ACLOCAL-aclocal}
echo "running $AL" >&2
$AL
} && {
AH=${AUTOHEADER-autoheader}
echo "running $AH [ignore the warnings]" >&2
$AH
} && {
AM=${AUTOMAKE-automake}
echo "running $AM" >&2
$AM --force-missing --foreign -a -c
} && {
AC=${AUTOCONF-autoconf}
echo "running $AC" >&2
$AC
} &&
echo "autogen complete" >&2 ||
echo "ERROR: autogen.sh failed, autogen is incomplete" >&2
#
# Run 'autoreconf' to build 'configure', 'Makefile.in' and other configure
# control files.
#
# The first time this is run on a GIT checkout the only files that exist are
# configure.ac and Makefile.am; all of the autotools support scripts are
# missing. They are instantiated with autoreconf --force --install.
#
# For regular ("tarball") distributions all the files should exist. We do not
# want them to be updated *under any circumstances*. It should never be
# necessary to rune autogen.sh because ./configure --enable-maintainer-mode says
# what to do if Makeile.am or configure.ac are changed.
#
# It is *probably* OK to update the files on a GIT checkout, because they have
# come from the local tools, but leave that to the user who is assumed to know
# whether it is ok or required.
#
# This script is intended to work without arguments, there are, however, hidden
# arguments for (a) use while testing the script and (b) to fix up systems that
# have been broken. If (b) is required the script prompts for the correct
# options. For this reason the options are *NOT* documented in the help; this
# is deliberate; UTSL.
#
clean=
maintainer=
while test $# -gt 0
do
case "$1" in
--maintainer)
maintainer=1;;
--clean)
clean=1;;
*)
exec >&2
echo "$0: usage: ./autogen.sh"
if test -d .git
then
echo " ./autogen.sh generates the configure script and"
echo " Makefile.in, or refreshes them after changes to Makefile.am"
echo " or configure.ac. You may prefer to just run autoreconf."
elif test -z "$maintainer"
then
echo " DO NOT RUN THIS SCRIPT."
echo " If you need to change Makefile.am or configure.ac then you"
echo " also need to run ./configure --enable-maintainer-mode and"
echo " use the appropriate autotools, *NOT* this script, to update"
echo " everything, please check the documentation of autoreconf."
echo " WARNING: libpng is intentionally generated with a known,"
echo " fixed, set of autotools. It is known *NOT* to work with"
echo " the collection of autotools distributed on highly reputable"
echo " operating systems."
echo " Remember: autotools is GNU software, you are expected to"
echo " pay for support."
else
echo " You have run autogen.sh with --maintainer enabled and you"
echo " are not using a GIT distribution, then you have given an"
echo " unrecognized argument. This is not good. --maintainer"
echo " switches off any assumptions that you might not know what"
echo " you are doing."
fi
exit 1;;
esac
shift
done
#
# First check for a set of the autotools files; if absent then this is assumed
# to be a GIT version and the local autotools must be used. If present this
# is a tarball distribution and the script should not be used. If partially
# present bad things are happening.
#
# The autotools generated files:
libpng_autotools_files="Makefile.in aclocal.m4 config.guess config.h.in\
config.sub configure depcomp install-sh ltmain.sh missing"
#
# These are separate because 'maintainer-clean' does not remove them.
libpng_libtool_files="scripts/libtool.m4 scripts/ltoptions.m4\
scripts/ltsugar.m4 scripts/ltversion.m4 scripts/lt~obsolete.m4"
libpng_autotools_dirs="autom4te.cache" # not required
#
# The configure generated files:
libpng_configure_files="Makefile config.h config.log config.status\
libpng-config libpng.pc libtool stamp-h1"
libpng_configure_dirs=".deps"
#
# We must remove the configure generated files as well as the autotools
# generated files if autotools are regenerated because otherwise if configure
# has been run without "--enable-maintainer-mode" make can do a partial update
# of Makefile. These functions do the two bits of cleaning.
clean_autotools(){
rm -rf $libpng_autotools_files $libpng_libtool_files $libpng_autotools_dirs
}
clean_configure(){
rm -rf $libpng_configure_files $libpng_configure_dirs
}
#
# Clean: remove everything (this is to help with testing)
if test -n "$clean"
then
clean_configure
if test -n "$maintainer"
then
clean_autotools
fi
exit 0
fi
#
# Validate the distribution.
libpng_autotools_file_found=
libpng_autotools_file_missing=
for file in $libpng_autotools_files
do
if test -f "$file"
then
libpng_autotools_file_found=1
else
libpng_autotools_file_missing=1
fi
done
#
# Presence of one of these does not *invalidate* missing, but absence
# invalidates found.
for file in $libpng_libtool_files
do
if test ! -f "$file"
then
libpng_autotools_file_missing=1
fi
done
#
# The cache directory doesn't matter - it will be regenerated and does not exist
# anyway in a tarball.
#
# Either everything is missing or everything is there, the --maintainer option
# just changes this so that the mode is set to generate all the files.
mode=
if test -z "$libpng_autotools_file_found" -o -n "$maintainer"
then
mode="autoreconf"
else
if test -n "$libpng_autotools_file_missing"
then
mode="broken"
else
mode="configure"
fi
fi
#
# So:
case "$mode" in
autoreconf)
# Clean in case configure files exist
clean_configure
clean_autotools
# Everything must be initialized, so use --force
if autoreconf --warnings=all --force --install
then
missing=
for file in $libpng_autotools_files
do
test -f "$file" || missing=1
done
# ignore the cache directory
test -z "$missing" || {
exec >&2
echo "autoreconf was run, but did not produce all the expected"
echo "files. It is likely that your autotools installation is"
echo "not compatible with that expected by libpng."
exit 1
}
else
exec >&2
echo "autoreconf failed: your version of autotools is incompatible"
echo "with this libpng version. Please use a distributed archive"
echo "(which includes the autotools generated files) and run configure"
echo "instead."
exit 1
fi;;
configure)
if test -d .git
then
exec >&2
echo "ERROR: running autoreconf on an initialized sytem"
echo " This is not necessary; it is only necessary to remake the"
echo " autotools generated files if Makefile.am or configure.ac"
echo " change and make does the right thing with:"
echo
echo " ./configure --enable-maintainer-mode."
echo
echo " You can run autoreconf yourself if you don't like maintainer"
echo " mode and you can also just run autoreconf -f -i to initialize"
echo " everything in the first place; this script is only for"
echo " compatiblity with prior releases."
exit 1
else
exec >&2
echo "autogen.sh is intended only to generate 'configure' on systems"
echo "that do not have it. You have a complete 'configure', if you"
echo "need to change Makefile.am or configure.ac you also need to"
echo "run configure with the --enable-maintainer-mode option."
exit 1
fi;;
broken)
exec >&2
echo "Your system has a partial set of autotools generated files."
echo "autogen.sh is unable to proceed. The full set of files is"
echo "contained in the libpng 'tar' distribution archive and you do"
echo "not need to run autogen.sh if you use it."
exit 1;;
esac
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
This directory (contrib/examples) contains examples of libpng usage.
NO COPYRIGHT RIGHTS ARE CLAIMED TO ANY OF THE FILES IN THIS DIRECTORY.
To the extent possible under law, the authors have waived all copyright and
related or neighboring rights to this work. This work is published from:
United States.
The files may be used freely in any way. The intention is that appropriate
parts of the files be used in other libpng-using programs without any need for
the authors of the using code to seek copyright or license from the original
authors.
The source code and comments in this directory are the original work of the
people named below. No other person or organization has made contributions to
the work in this directory.
ORIGINAL AUTHORS
The following people have contributed to the code in this directory. None
of the people below claim any rights with regard to the contents of this
directory.
John Bowler <jbowler@acm.org>
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -23,9 +23,9 @@
# macros --------------------------------------------------------------------
PNGINC = -I/usr/local/include/libpng15
PNGLIB = -L/usr/local/lib -lpng15 # dynamically linked against libpng
#PNGLIB = /usr/local/lib/libpng15.a # statically linked against libpng
PNGINC = -I/usr/local/include/libpng16
PNGLIB = -L/usr/local/lib -lpng16 # dynamically linked against libpng
#PNGLIB = /usr/local/lib/libpng16.a # statically linked against libpng
# or:
#PNGINC = -I../..
#PNGLIB = -L../.. -lpng
......
......@@ -26,14 +26,14 @@
# macros --------------------------------------------------------------------
#PNGDIR = /usr/local/lib
#PNGINC = -I/usr/local/include/libpng15
#PNGLIBd = -L$(PNGDIR) -lpng15 # dynamically linked, installed libpng
#PNGLIBs = $(PNGDIR)/libpng15.a # statically linked, installed libpng
#PNGINC = -I/usr/local/include/libpng16
#PNGLIBd = -L$(PNGDIR) -lpng16 # dynamically linked, installed libpng
#PNGLIBs = $(PNGDIR)/libpng16.a # statically linked, installed libpng
# or:
PNGDIR = ../..# this one is for libpng-x.y.z/contrib/gregbook builds
#PNGDIR = ../libpng
PNGINC = -I$(PNGDIR)
PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng15 # dynamically linked
PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng16 # dynamically linked
PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng
ZDIR = /usr/local/lib
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
#!/bin/sh
#
# Run the simplified API tests
err=0
echo >> pngtest-log.txt
echo "============ pngstest.sh ==============" >> pngtest-log.txt
echo "Running test-pngstest.sh"
for image in ${srcdir}/contrib/pngsuite/*.png
do
for opts in ""
do
if ./pngstest --strict --log "$@" $opts $image >>pngtest-log.txt 2>&1
then
echo " PASS: pngstest $opts $image"
else
echo " FAIL: pngstest $opts $image"
err=1
fi
done
done
exit $err
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
文件模式从 100755 更改为 100644
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册