Przeglądaj źródła

secsipid: use pkg-config when available

Victor Seva 4 lat temu
rodzic
commit
231a6eceeb
1 zmienionych plików z 8 dodań i 2 usunięć
  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