[sr-dev] git:master:231a6ece: secsipid: use pkg-config when available

Victor Seva linuxmaniac at torreviejawireless.org
Thu Jan 7 12:34:24 CET 2021


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

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2021-01-07T12:17:23+01:00

secsipid: use pkg-config when available

---

Modified: src/modules/secsipid/Makefile

---

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

---

diff --git a/src/modules/secsipid/Makefile b/src/modules/secsipid/Makefile
index 1ac4cdb87c..752c07c855 100644
--- a/src/modules/secsipid/Makefile
+++ b/src/modules/secsipid/Makefile
@@ -7,8 +7,14 @@ include ../../Makefile.defs
 auto_gen=
 NAME=secsipid.so
 
-DEFS+= -I.
-LIBS+= -L. -lsecsipid
+BUILDER = $(shell which pkg-config)
+ifeq ($(BUILDER),)
+	DEFS+= -I.
+	LIBS = -L. -lsecsipid
+else
+	DEFS+= $(shell pkg-config --cflags secsipid-1)
+	LIBS = $(shell pkg-config --libs secsipid-1)
+endif
 
 ifeq ($(OS), darwin)
 LIBS+= -framework CoreFoundation -framework Security -lpthread




More information about the sr-dev mailing list