Module: kamailio
Branch: master
Commit: d41924862a1729de186a5d1f4adddcfeb7fb7b7d
URL:
https://github.com/kamailio/kamailio/commit/d41924862a1729de186a5d1f4adddcf…
Author: Joel Centelles <joel_centellesmartin(a)baxter.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-06-20T10:45:31+02:00
ndb_redis: Searching SSL support in gcc search library path
Checking libhiredis_ssl.so in gcc --print-search-dirs
---
Modified: src/modules/ndb_redis/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/d41924862a1729de186a5d1f4adddcf…
Patch:
https://github.com/kamailio/kamailio/commit/d41924862a1729de186a5d1f4adddcf…
---
diff --git a/src/modules/ndb_redis/Makefile b/src/modules/ndb_redis/Makefile
index a90e3018b4..6b27f72386 100644
--- a/src/modules/ndb_redis/Makefile
+++ b/src/modules/ndb_redis/Makefile
@@ -23,10 +23,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),)
- HIREDISDEFS += -DWITH_SSL
- HIREDISLIBS += -lhiredis_ssl
- endif
+ 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
ifeq (,$(findstring hiredis,$(HIREDISDEFS)))
DEFS+=-DWITH_HIREDIS_PATH