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

Author: Henning Westerholt <[email protected]>
Committer: Henning Westerholt <[email protected]>
Date: 2025-12-09T16:47:34Z

auth_web3: also use common curl based Makefile with pkg-config/curl-config 
support

---

Modified: src/modules/auth_web3/Makefile

---

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

---

diff --git a/src/modules/auth_web3/Makefile b/src/modules/auth_web3/Makefile
index 158081f6eb2..2dcd63cd116 100644
--- a/src/modules/auth_web3/Makefile
+++ b/src/modules/auth_web3/Makefile
@@ -1,4 +1,8 @@
-# Web3 Authentication Module Makefile
+#
+# auth_web3 module makefile
+#
+#
+# WARNING: do not run this directly, it should be run by the main Makefile
 
 include ../../Makefile.defs
 auto_gen=
@@ -7,8 +11,21 @@ NAME=auth_web3.so
 # Include additional source files
 EXTRA_SRCS=keccak256.c
 
-DEFS+=-DKAMAILIO_MOD_INTERFACE
+ifeq ($(CROSS_COMPILE),)
+CURL_BUILDER=$(shell \
+       if pkg-config --exists libcurl; then \
+               echo 'pkg-config libcurl'; \
+       else \
+               which curl-config; \
+       fi)
+endif
 
-LIBS=-lcurl
+ifneq ($(CURL_BUILDER),)
+       DEFS += $(shell $(CURL_BUILDER) --cflags )
+       LIBS += $(shell $(CURL_BUILDER) --libs)
+else
+       DEFS+=-I$(LOCALBASE)/include
+       LIBS+=-L$(LOCALBASE)/lib -lcurl
+endif
 
-include ../../Makefile.modules 
\ No newline at end of file
+include ../../Makefile.modules

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to