[sr-dev] git:master:af7db21e: ims_ipsec_pcscf: Makefile - use pkg-config to get compile flags for libmnl

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 7 09:33:46 CET 2018


Module: kamailio
Branch: master
Commit: af7db21e401f9cfc776944693a85d38498ce421a
URL: https://github.com/kamailio/kamailio/commit/af7db21e401f9cfc776944693a85d38498ce421a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-11-07T09:30:35+01:00

ims_ipsec_pcscf: Makefile - use pkg-config to get compile flags for libmnl

- GH #1710

---

Modified: src/modules/ims_ipsec_pcscf/Makefile

---

Diff:  https://github.com/kamailio/kamailio/commit/af7db21e401f9cfc776944693a85d38498ce421a.diff
Patch: https://github.com/kamailio/kamailio/commit/af7db21e401f9cfc776944693a85d38498ce421a.patch

---

diff --git a/src/modules/ims_ipsec_pcscf/Makefile b/src/modules/ims_ipsec_pcscf/Makefile
index 4e4e43d14c..055e8b80ca 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




More information about the sr-dev mailing list