On Tue, 12 Nov 2024, Tomas Glozar wrote: > út 12. 11. 2024 v 15:49 odesílatel John Kacur <jkacur@xxxxxxxxxx> napsal: > > > > This seems overly complicated, how about just doing > > > > ldconfig -p | grep -q libcpupower > > > > if it returns 0, the lib is there, if it returns 1, it's not there. > > > > This is the mechanism that perf uses, you can see in > > tools/perf/Makefile.config > > > > ifneq ($(shell ldconfig -p | grep libasan >/dev/null 2>&1; echo $$?), 0) > > $(error No libasan found, please install libasan) > > endif > > > > Is that really enough? We also need to check for the presence of the > header, taking CPPFLAGS into account, and also account for any > addition LDFLAGS. I think this is the simplest solution to ensure that > libcpupower is present for both header and library and working with > the current configuration of the compiler. > > Tomas Ah right, thanks for pointing that out. John