Module: kamailio
Branch: 5.7
Commit: 8ed9cf81c045d7946b07d8c98686acf92cd68776
URL:
https://github.com/kamailio/kamailio/commit/8ed9cf81c045d7946b07d8c98686acf…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-05-15T13:42:27+02:00
tls_wolfssl: use wolfssl lib from system if available
(cherry picked from commit 14b1f79c29f317c74bbcbba75853ce45c353a865)
---
Modified: src/modules/tls_wolfssl/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/8ed9cf81c045d7946b07d8c98686acf…
Patch:
https://github.com/kamailio/kamailio/commit/8ed9cf81c045d7946b07d8c98686acf…
---
diff --git a/src/modules/tls_wolfssl/Makefile b/src/modules/tls_wolfssl/Makefile
index 75ec31b204d..0eaa83c615f 100644
--- a/src/modules/tls_wolfssl/Makefile
+++ b/src/modules/tls_wolfssl/Makefile
@@ -8,6 +8,12 @@ include ../../Makefile.defs
auto_gen=
NAME=tls_wolfssl.so
+WOLF_BUILDER = $(shell \
+ if pkg-config --exists wolfssl; then \
+ echo 'pkg-config wolfssl'; \
+ fi)
+
+ifeq ($(WOLF_BUILDER),)
WOLFSSL_PREFIX = ../../../misc/external/wolfssl/build
WOLFSSL_SRC = ../../../misc/external/wolfssl/wolfssl
@@ -33,6 +39,12 @@ $(WOLFSSL_PREFIX)/include/wolfssl/options.h
$(WOLFSSL_PREFIX)/lib/libwolfssl.a:
@$(MAKE) -C $(WOLFSSL_SRC) install
$(NAME): $(WOLFSSL_PREFIX)/lib/libwolfssl.a
+else
+ DEFS += $(shell $(WOLF_BUILDER) --cflags)
+ LIBS += $(shell $(WOLF_BUILDER) --libs)
+
+ include ../../Makefile.modules
+endif
clean-wolfssl:
@rm -rf $(WOLFSSL_PREFIX)/{bin,include,share,lib}; \