From: Helmut Grohne <hel...@subdivi.de>

dlm fails to cross build from source, because the upstream Makefile
hard codes the build architecture pkg-config. The attached patch
makes pkg-config substitutable.

Signed-off-by: Valentin Vidic <valentin.vi...@carnet.hr>
---
 dlm_controld/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
index 85c2db12..75c5750e 100644
--- a/dlm_controld/Makefile
+++ b/dlm_controld/Makefile
@@ -48,10 +48,11 @@ BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -pie
 BIN_LDFLAGS += -lpthread -lrt -lcpg -lcmap -lcfg -lquorum
 LIB_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -pie
 
+PKG_CONFIG ?= pkg-config
 ifeq ($(USE_SD_NOTIFY),yes)
-       BIN_CFLAGS += $(shell pkg-config --cflags libsystemd) \
+       BIN_CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd) \
                      -DUSE_SD_NOTIFY
-       BIN_LDFLAGS += $(shell pkg-config --libs libsystemd)
+       BIN_LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd)
 endif
 
 all: $(LIB_TARGET) $(BIN_TARGET)
-- 
2.19.1

Reply via email to