]> sigrok.org Git - libsigrok.git/commitdiff
configure: make zlib an optional dependency which input/stf depends on
authorGerhard Sittig <redacted>
Wed, 22 Dec 2021 12:39:38 +0000 (13:39 +0100)
committerGerhard Sittig <redacted>
Wed, 22 Dec 2021 19:04:28 +0000 (20:04 +0100)
The STF input module calls into the zlib's crc32() routine, although
this dependency is not checked for and need not be satisfied. This went
unnoticed because zlib is rather ubiquitous, most development machines
provide it.

Extend the configure script to check for the zlib presence. Absence is
non-fatal (the library is truly optional). Reflect the version details
in the libsigrok version output, update the README. Make the STF input
module depend on the zlib presence, which makes the module optional.

It's unfortunate that the MiniLZO library which the libsigrok source
embeds does not provide the CRC32 calculation. Else we could have used
it instead of introducing another external dependency.

This implementation attempts to properly separate the autoconf/shell
layer from the automake layer from the C language preprocessor, and
separate the zlib library availability from the compression and CRC32
calculation availability from the STF input module applicability. This
shall prepare more zlib use in future implementations.


No differences found