From e8f924422465b357cd3a08cd52773df5a8a3d719 Mon Sep 17 00:00:00 2001 From: Sertonix Date: Tue, 28 Oct 2025 20:51:19 +0100 Subject: [PATCH] opticsmon: Use $(PKG_CONFIG) instead of calling pkg-config directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Is more consistent with other Makefiles and fixes cross compilation if it relies on a modified $(PKG_CONFIG). Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/193 Signed-off-by: Sertonix Reviewed-by: Steffen Eiden Reviewed-by: Jan Höppner Signed-off-by: Jan Höppner --- opticsmon/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/opticsmon/Makefile b/opticsmon/Makefile index 20ebace7..365f50a0 100644 --- a/opticsmon/Makefile +++ b/opticsmon/Makefile @@ -42,17 +42,17 @@ install: else ifneq ($(shell sh -c 'command -v pkg-config'),) -LIB_CFLAGS += $(shell pkg-config --silence-errors --cflags libnl-3.0) -LIB_CFLAGS += $(shell pkg-config --silence-errors --cflags libnl-genl-3.0) -LIB_CFLAGS += $(shell pkg-config --silence-errors --cflags libnl-route-3.0) +LIB_CFLAGS += $(shell $(PKG_CONFIG) --silence-errors --cflags libnl-3.0) +LIB_CFLAGS += $(shell $(PKG_CONFIG) --silence-errors --cflags libnl-genl-3.0) +LIB_CFLAGS += $(shell $(PKG_CONFIG) --silence-errors --cflags libnl-route-3.0) -LIB_CFLAGS += $(shell pkg-config --silence-errors --cflags libcrypto) +LIB_CFLAGS += $(shell $(PKG_CONFIG) --silence-errors --cflags libcrypto) -LIB_LFLAGS += $(shell pkg-config --silence-errors --libs libnl-3.0) -LIB_LFLAGS += $(shell pkg-config --silence-errors --libs libnl-genl-3.0) -LIB_LFLAGS += $(shell pkg-config --silence-errors --libs libnl-route-3.0) +LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnl-3.0) +LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnl-genl-3.0) +LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnl-route-3.0) -LIB_LFLAGS += $(shell pkg-config --silence-errors --libs libcrypto) +LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libcrypto) else LIB_CFLAGS += -I /usr/include/libnl3/ LIB_LFLAGS += -lnl-route-3 -lnl-genl-3 -lnl-3