On 10/24/22 18:48, Dmitry V. Levin wrote: > On Mon, Oct 24, 2022 at 02:17:17PM +0200, Martin Liška wrote: >> On 10/24/22 13:41, Dmitry V. Levin wrote: >>> On Mon, Oct 24, 2022 at 01:09:59PM +0200, Martin Liška wrote: >>> [...] >>>> One TODO I see is that: >>>> +libelf_so_LDLIBS = $(libelf_so_DEPS) -lz -lzstd >>>> >>>> should be conditional based on HAVE_ZSTD. But I don't know how to do that? >>> >>> I suppose you're talking about libzstd_LIBS. >> >> Hm, can't see it after autoreconf -fi and ./configure. > > That's because you do > PKG_CHECK_MODULES(ZSTD, [libzstd], ...) > and this defines ZSTD_CFLAGS and ZSTD_LIBS instead of libzstd_CFLAGS > and libzstd_LIBS because PKG_CHECK_MODULES() uses its first argument > as the prefix for these variables. > > Thank you. Apparently, I collided with the existing: eu_ZIPLIB(zstd,ZSTD,zstd,ZSTD_decompress,[ZSTD (zst)]) Anyway, I'm sending V2 that works fine --with-zstd and --without-zstd as expected. Ready for master? Thanks, Martin