Browse Source

secsipid: use pkg-config when available

Victor Seva 4 năm trước cách đây
mục cha
commit
231a6eceeb
1 tập tin đã thay đổi với 8 bổ sung2 xóa
  1. 8 2
      src/modules/secsipid/Makefile

+ 8 - 2
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