Module: kamailio
Branch: master
Commit: 14b1f79c29f317c74bbcbba75853ce45c353a865
URL: 
https://github.com/kamailio/kamailio/commit/14b1f79c29f317c74bbcbba75853ce45c353a865

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@torreviejawireless.org>
Date: 2023-05-15T13:35:48+02:00

tls_wolfssl: use wolfssl lib from system if available

---

Modified: src/modules/tls_wolfssl/Makefile

---

Diff:  
https://github.com/kamailio/kamailio/commit/14b1f79c29f317c74bbcbba75853ce45c353a865.diff
Patch: 
https://github.com/kamailio/kamailio/commit/14b1f79c29f317c74bbcbba75853ce45c353a865.patch

---

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}; \

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to