(cherry picked from commit 231a6eceeb67318cf4708a765b47df6c336350da)
... | ... |
@@ -7,8 +7,14 @@ include ../../Makefile.defs |
7 | 7 |
auto_gen= |
8 | 8 |
NAME=secsipid.so |
9 | 9 |
|
10 |
-DEFS+= -I. |
|
11 |
-LIBS+= -L. -lsecsipid |
|
10 |
+BUILDER = $(shell which pkg-config) |
|
11 |
+ifeq ($(BUILDER),) |
|
12 |
+ DEFS+= -I. |
|
13 |
+ LIBS = -L. -lsecsipid |
|
14 |
+else |
|
15 |
+ DEFS+= $(shell pkg-config --cflags secsipid-1) |
|
16 |
+ LIBS = $(shell pkg-config --libs secsipid-1) |
|
17 |
+endif |
|
12 | 18 |
|
13 | 19 |
ifeq ($(OS), darwin) |
14 | 20 |
LIBS+= -framework CoreFoundation -framework Security -lpthread |