libbpf: Add zlib as a dependency in pkg-config template
authorAndrii Nakryiko <andriin@fb.com>
Mon, 16 Dec 2019 18:38:29 +0000 (10:38 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 16 Dec 2019 22:55:29 +0000 (14:55 -0800)
List zlib as another dependency of libbpf in pkg-config template.
Verified it is correctly resolved to proper -lz flag:

$ make DESTDIR=/tmp/libbpf-install install
$ pkg-config --libs /tmp/libbpf-install/usr/local/lib64/pkgconfig/libbpf.pc
-L/usr/local/lib64 -lbpf
$ pkg-config --libs --static /tmp/libbpf-install/usr/local/lib64/pkgconfig/libbpf.pc
-L/usr/local/lib64 -lbpf -lelf -lz

Fixes: 166750bc1dd2 ("libbpf: Support libbpf-provided extern variables")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Cc: Luca Boccassi <bluca@debian.org>
Link: https://lore.kernel.org/bpf/20191216183830.3972964-1-andriin@fb.com
tools/lib/bpf/libbpf.pc.template

index ac17fcef2108ec81dc8800d97e3cd4f6c127b253..b45ed534bdfb58779eec4c3abfd8c5e188ae87f0 100644 (file)
@@ -8,5 +8,5 @@ Name: libbpf
 Description: BPF library
 Version: @VERSION@
 Libs: -L${libdir} -lbpf
-Requires.private: libelf
+Requires.private: libelf zlib
 Cflags: -I${includedir}