[libpng17] Ported recent changes from libpng16 to libpng17

Fixed 'minimal' builds. Various obviously useful minimal configurations
  don't build because of missing contrib/libtests test programs and overly
  complex dependencies in scripts/pnglibconf.dfa. This change adds
  contrib/conftest/*.dfa files that can be used in automatic build
  scripts to ensure that these configurations continue to build.
Enabled WRITE_INVERT and WRITE_PACK in contrib/pngminim/encoder.
This commit is contained in:
John Bowler
2013-11-22 17:41:20 -06:00
committed by Glenn Randers-Pehrson
parent 81824079b5
commit 7e2707e2af
35 changed files with 738 additions and 271 deletions

View File

@@ -282,7 +282,7 @@ $1 == "option" && NF >= 2{
for (i=istart; i<=NF; ++i) {
val=$(i)
sub(/,$/,"",val)
if (val == "on" || val == "off" || val == "disabled") {
if (val == "on" || val == "off" || val == "disabled" || val =="enabled") {
key = ""
if (onoff != val) {
# on or off can zap disabled or enabled:
@@ -687,9 +687,11 @@ END{
}
# if
have_ifs = 0
nreqs = split(iffs[i], r)
print "#undef PNG_no_if" >out
if (nreqs > 0) {
have_ifs = 1
print "/* if" iffs[i], "*/" >out
print "#define PNG_no_if 1" >out
for (j=1; j<=nreqs; ++j) {
@@ -727,7 +729,10 @@ END{
print "# ifndef PNG_" i "_SUPPORTED /*!command line*/" >out
print "# ifdef PNG_not_enabled /*!enabled*/" >out
if (option[i] == "off" || option[i] == "disabled" && everything != "on" || option[i] == "enabled" && everything == "off") {
# 'have_ifs' here means that everything = "off" still allows an 'if' on
# an otherwise enabled option to turn it on; otherwise the 'if'
# handling is effectively disabled by 'everything = off'
if (option[i] == "off" || option[i] == "disabled" && everything != "on" || option[i] == "enabled" && everything == "off" && !have_ifs) {
print "# undef PNG_on /*default off*/" >out
} else {
print "# ifdef PNG_NO_" i >out