Module: kamailio
Branch: master
Commit: f15c768ce89ef78eb87e476d4c6dff0b29585df2
URL:
https://github.com/kamailio/kamailio/commit/f15c768ce89ef78eb87e476d4c6dff0…
Author: Riccardo Villa <riccardo.villa(a)netaxis.be>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-01-20T12:30:22+01:00
db_redis: added hiredis-cluster detection
---
Modified: src/modules/db_redis/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/f15c768ce89ef78eb87e476d4c6dff0…
Patch:
https://github.com/kamailio/kamailio/commit/f15c768ce89ef78eb87e476d4c6dff0…
---
diff --git a/src/modules/db_redis/Makefile b/src/modules/db_redis/Makefile
index ca8020d543..179bc6f406 100644
--- a/src/modules/db_redis/Makefile
+++ b/src/modules/db_redis/Makefile
@@ -10,6 +10,12 @@ HIREDIS_BUILDER = $(shell \
if pkg-config --exists hiredis; then \
echo 'pkg-config hiredis'; \
fi)
+
+HIREDIS_CLUSTER_BUILDER = $(shell \
+ if pkg-config --exists hiredis_cluster; then \
+ echo 'pkg-config hiredis_cluster'; \
+ fi)
+
endif
ifeq ($(HIREDIS_BUILDER),)
@@ -33,6 +39,14 @@ endif
DEFS+=$(HIREDISDEFS)
LIBS=$(HIREDISLIBS)
+ifneq ($(HIREDIS_CLUSTER_BUILDER),)
+ HIREDISCLUSTERDEFS = $(shell $(HIREDIS_CLUSTER_BUILDER) --cflags)
+ HIREDISCLUSTERLIBS = $(shell $(HIREDIS_CLUSTER_BUILDER) --libs)
+ DEFS+=-DWITH_HIREDIS_CLUSTER
+ DEFS+=$(HIREDISCLUSTERDEFS)
+ LIBS+=$(HIREDISCLUSTERLIBS)
+endif
+
SERLIBPATH=../../lib
SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1