Re: contrib/conftests

John Bowler <[email protected]> Sun, 18 Sep 2022 18:44:36 -0700
Newsgroups gmane.comp.graphics.png.devel
Message-ID <CAP7U399tZLEaj3JqZu+kFMFK_mQz-qEavCg_aaMJPwWkkpORRQ@mail.gmail.com>
> If pngcp.dfa is meant to be as a conftest, then I would be inclined to
move both pngcp.c and pngcp.dfa to their own glorify directory, say,
contrib/pngcp/ or contrib/pngcopy/, which could then work not unlike
contrib/gregbook/ or contrib/pngminus/.

No; the two files are not related.  pngcp.dfa tests a minimal configuration
to build pngcp, but pngcp is not built against the result.  That would
break on many architectures.  pngcp.dfa is a completely independent piece
of source code, it just happens to mirror (really mirror) what pngcp uses,
if someone changes pngcp that might all change, yet pngcp.dfa remains a
completely valid test.

The problem underlying contrib/conftests is that libpng has an enormous
number of configuration options yet many of them (prior to my rewrite of
the configuration handling) would simply not build.  If you go back into
the archives in 1996/7 you will find me pushing bugs about the
configuration options combos that did not work.  These issues were not
fixed until I rewrote the whole thing (the awk script).  This is why
Microsoft abandoned libpng after 1996; it was just too big and it was just
impossible to reduce the size.  I wrote a completely independent,
minimalist, decoder to meet the MS needs (not IE, obviously, it was broken
to the grave).

In practice the actual tests that count now probably don't include
pngcp.dfa - it was just an example of something that does read and write,
but none of of those tests are copyrighted by anyone other than Glenn (now,
I assume, you) and myself and my copyright only extends to the limit where
I can't (or rather don't) give it away.

I suggest you move all the conftests out of 'contrib' and into a separate
directory, like the top level one (this is something Glenn was extremely
averse to).  Moving other stuff is more problematic; pretty much anything
that wasn't part of the library had to go into 'contrib'.  You could invent
a new directory, say 'tools', but do you really want to do that?  There
really aren't any tools; they are separate projects, like pngcrush
(possibly the most, maybe only, useful tool.)  This, however, is a separate
discussion. libtests and the ones in pngminus really are part of the build,
libtests is part of the build too.

_______________________________________________
png-mng-implement mailing list
png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/png-mng-implement