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. [...] > diff --git a/m4/zstd.m4 b/m4/zstd.m4 > new file mode 100644 > index 00000000..6da4db68 > --- /dev/null > +++ b/m4/zstd.m4 > @@ -0,0 +1,23 @@ > +dnl Copyright (C) 2022 Free Software Foundation, Inc. > +dnl This file is free software, distributed under the terms of the GNU > +dnl General Public License. As a special exception to the GNU General > +dnl Public License, this file may be distributed as part of a program > +dnl that contains a configuration script generated by Autoconf, under > +dnl the same distribution terms as the rest of that program. > + > +dnl Enable features using the zstd library. > +AC_DEFUN([AC_ZSTD], [ > +AC_ARG_WITH(zstd, > + [AS_HELP_STRING([--with-zstd], [support zstd compressed debug sections > (default=auto)])], > + [], [with_zstd=auto]) Where does this code come from? I though the "AC_" prefix is reserved for the GNU Autoconf. Also, looks like it would be more appropriate to call it --enable-zstd rather than --with-zstd. -- ldv