@@ -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