Hi all,

After Lukas and Ilya's comments on the difficulty to use libslz, last
week I tried to find a way to cleanly import libslz into haproxy (that's
only 2 files basically), *and* at the same time keep the ability to use
an external one for those who want. It resulted in a configuration mess
(for those who build it) and some ugly ifdefs all over the place in the
code to decide what includes to take, so I gave up.

William suggested that I was needlessly seeking for trouble and that it
was pointless to keep compatibility for *both* an external version and
an internal one. While I initially wanted to demonstrate him he was wrong,
I realized that I was the one wrong because the lib had considerably
stabilized (no change over one year), and after all we already embed a
few other things like xxhash and ebtree without offering the possibility
to build with an external variant, and in the end it probably was the
right solution.

So after changing my mind, I would go with the following approach:

  - building with USE_SLZ=1  => always use the embedded one
  - building with USE_ZLIB=1 => always build using the user-provided zlib

We'd enable USE_SLZ by default and it would be disabled when ZLIB is used
(or when SLZ is forced off). This way we could have fast and memory-less
compression available by default without the hassle of cloning an unknown
repository.

Does anyone have any opinion, objection or suggestion on this (especially
those in CC who participated to the first discussion or who could have
packaging concerns) ? Barring any comment I think I'm going to do this
tomorrow so that we have it in -dev17, leaving a bit of time for distro
packagers to test and adjust their build process if needed.

Thanks,
Willy

Reply via email to