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

Author: SPChan <shihping.c...@gmail.com>
Committer: SPChan <shihping.c...@gmail.com>
Date: 2023-11-18T21:14:06+08:00

tls_wolfssl: enable building with external package

- build with git submodule: make ...WOLFSSL_INTERNAL=yes... - the default
- build with external package: make ...WOLFSSL_INTERNAL=no...

Debian recommended environment is libwolfssl41 5.6.4, libwolfssl-dev 5.6.4

---

Modified: src/modules/tls_wolfssl/Makefile

---

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

---

diff --git a/src/modules/tls_wolfssl/Makefile b/src/modules/tls_wolfssl/Makefile
index fe2e7d8d4ed..1a6254ea7b2 100644
--- a/src/modules/tls_wolfssl/Makefile
+++ b/src/modules/tls_wolfssl/Makefile
@@ -8,6 +8,13 @@ include ../../Makefile.defs
 auto_gen=
 NAME=tls_wolfssl.so
 
+# make WOLFSSL_INTERNAL=yes...  for internal submodule
+# make WOLFSSL_INTERNAL=no... for system package
+# default: yes
+
+WOLFSSL_INTERNAL ?= yes
+
+ifeq ($(WOLFSSL_INTERNAL),yes)
 WOLFSSL_PREFIX = ../../../misc/external/wolfssl/build
 WOLFSSL_SRC = ../../../misc/external/wolfssl/wolfssl
 
@@ -34,6 +41,15 @@ $(WOLFSSL_PREFIX)/include/wolfssl/options.h 
$(WOLFSSL_PREFIX)/lib/libwolfssl.a:
 
 $(NAME): $(WOLFSSL_PREFIX)/lib/libwolfssl.a
 
+else
+WOLFSSL_LIBS ?= $(shell pkg-config wolfssl --libs)
+WOLFSSL_INCLUDES ?= $(shell pkg-config wolfssl --cflags)
+
+LIBS += $(WOLFSSL_LIBS)
+INCLUDES +=  $(WOLFSSL_INCLUDES)
+include ../../Makefile.modules
+endif
+
 clean-wolfssl:
        @rm -rf $(WOLFSSL_PREFIX)/{bin,include,share,lib}; \
        (cd $(WOLFSSL_SRC); make distclean) || /bin/true

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

Reply via email to