Hi Paul,

On Mon, Sep 09, 2024 at 06:21:16PM -0400, Paul Smith wrote:
> On Mon, 2024-09-09 at 15:29 -0400, Paul Smith wrote:
> > I'm trying to build the latest elfutils release 0.191.  The configure
> > help says:
> > 
> >   ZSTD_COMPRESS_CFLAGS
> >               C compiler flags for ZSTD_COMPRESS, overriding pkg-
> > config
> >   ZSTD_COMPRESS_LIBS
> >               linker flags for ZSTD_COMPRESS, overriding pkg-config
> 
> Actually, these variables don't seem to work either.
> 
> Looking at the generated configure script, I don't see how to get
> elfutils to use zstd from a non-standard location?

Yeah, this is unfortunate. There are two checks in configure.ac. One
for zstd decompression support (as used in libdw) which uses the
eu_ZIPLIB macro (as defined in m4/zip.m4). This is the main check, it
also creates the --with-zstd=... configure argument to provide an
alternative location.

But then there is this version check that uses pkgconfig to see if
this is zstd version 1.4.0 or higher. Which is then used to see if we
can add decompression support of zstd compressed sections in libelf.

You are right, they are not fully compatible ways to detect zstd
library support. I wonder if it is reasonable now to just check for
some 1.4.0 zstd symbol to get both libdw decompression and libelf
compression support at the same time. Then you only need the eu_ZIPLIB
macro and can forget about the pkgconfig version check.

Cheers,

Mark

Reply via email to