[sr-dev] git:master:31e28717: topos_redis: Makefile - detect if pkg-config gives hiredis in include path

Daniel-Constantin Mierla miconda at gmail.com
Thu Sep 27 09:56:34 CEST 2018


Module: kamailio
Branch: master
Commit: 31e2871739a0b7a212d6d335f3ade7eefd48454c
URL: https://github.com/kamailio/kamailio/commit/31e2871739a0b7a212d6d335f3ade7eefd48454c

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-09-27T09:56:20+02:00

topos_redis: Makefile - detect if pkg-config gives hiredis in include path

---

Modified: src/modules/topos_redis/Makefile

---

Diff:  https://github.com/kamailio/kamailio/commit/31e2871739a0b7a212d6d335f3ade7eefd48454c.diff
Patch: https://github.com/kamailio/kamailio/commit/31e2871739a0b7a212d6d335f3ade7eefd48454c.patch

---

diff --git a/src/modules/topos_redis/Makefile b/src/modules/topos_redis/Makefile
index 1f26efce9a..ca64a00421 100644
--- a/src/modules/topos_redis/Makefile
+++ b/src/modules/topos_redis/Makefile
@@ -13,12 +13,16 @@ HIREDIS_BUILDER = $(shell \
 endif
 
 ifeq ($(HIREDIS_BUILDER),)
-	HIREDISDEFS=-I$(LOCALBASE)/include
+	HIREDISDEFS=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/hiredis
 	HIREDISLIBS=-L$(LOCALBASE)/lib -lhiredis
 else
 	HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
 	HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
 
+ifeq (,$(findstring hiredis,$(HIREDISDEFS)))
+	DEFS+=-DWITH_HIREDIS_PATH
+endif
+
 ifeq ($(HIREDISLIBS),-L -lhiredis)
 		HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags) /opt/local/include
 		HIREDISLIBS = -L/opt/local/lib -lhiredis




More information about the sr-dev mailing list