From 3843c4c8c086f31f6126f0659c732141681229b9 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Wed, 7 Nov 2018 09:30:35 +0100 Subject: [PATCH] ims_ipsec_pcscf: Makefile - use pkg-config to get compile flags for libmnl - GH #1710 (cherry picked from commit af7db21e401f9cfc776944693a85d38498ce421a) --- src/modules/ims_ipsec_pcscf/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/modules/ims_ipsec_pcscf/Makefile b/src/modules/ims_ipsec_pcscf/Makefile index 4e4e43d14cd..055e8b80ca5 100644 --- a/src/modules/ims_ipsec_pcscf/Makefile +++ b/src/modules/ims_ipsec_pcscf/Makefile @@ -8,10 +8,25 @@ include ../../Makefile.defs auto_gen= NAME=ims_ipsec_pcscf.so +ifeq ($(CROSS_COMPILE),) + BUILDER = $(shell which pkg-config) +ifneq ($(BUILDER),) + PKGLIBMNL = $(shell $(BUILDER) --exists libmnl > /dev/null 2>&1 ; echo $$? ) +ifneq ($(PKGLIBMNL),0) + BUILDER = +endif +endif +endif + +ifneq ($(BUILDER),) + DEFS += $(shell $(BUILDER) --cflags libmnl) + LIBS += $(shell $(BUILDER) --libs libmnl) +else ifneq ($(OS),darwin) LIBS += -lpthread LIBS += -lmnl endif +endif SERLIBPATH=../../lib SER_LIBS+=$(SERLIBPATH)/ims/kamailio_ims