Module: kamailio
Branch: master
Commit: f7a712b36918bd9c01256fb2b283754ad9ed7422
URL:
https://github.com/kamailio/kamailio/commit/f7a712b36918bd9c01256fb2b283754…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-06-20T10:45:31+02:00
db_redis: Searching SSL support in gcc search library path
Checking libhiredis_ssl.so in gcc --print-search-dirs
---
Modified: src/modules/db_redis/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/f7a712b36918bd9c01256fb2b283754…
Patch:
https://github.com/kamailio/kamailio/commit/f7a712b36918bd9c01256fb2b283754…
---
diff --git a/src/modules/db_redis/Makefile b/src/modules/db_redis/Makefile
index 7d427586e98..f2231c26aec 100644
--- a/src/modules/db_redis/Makefile
+++ b/src/modules/db_redis/Makefile
@@ -29,10 +29,18 @@ else
HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
HIREDISLIBSPATH = $(shell $(HIREDIS_BUILDER) --libs-only-L | cut -c 3-)
- ifneq ($(shell ls $(HIREDISLIBSPATH) | grep libhiredis_ssl.so),)
+ ifeq ($(HIREDISLIBSPATH),)
+ GCCSEARCHDIRS = $(shell $(CC) -print-search-dirs | grep -Po '^.*libraries:
=.*' | cut -d "=" -f2- | tr : ' ')
+ ifneq ($(shell find $(GCCSEARCHDIRS) libhiredis_ssl.so),)
+ HIREDISDEFS += -DWITH_SSL
+ HIREDISLIBS += -lhiredis_ssl
+ endif
+ else
+ ifneq ($(shell ls $(HIREDISLIBSPATH) | grep libhiredis_ssl.so),)
HIREDISDEFS += -DWITH_SSL
HIREDISLIBS += -lhiredis_ssl
- endif
+ endif
+ endif
ifeq (,$(findstring hiredis,$(HIREDISDEFS)))
DEFS+=-DWITH_HIREDIS_PATH