Browse code

secsipid: use pkg-config when available

Victor Seva authored on 07/01/2021 10:14:53
Showing 1 changed files
... ...
@@ -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