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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-01-06T17:17:09+01:00

auth_arnacon: Makefile - use pkg-config to discover libcurl

---

Modified: src/modules/auth_arnacon/Makefile

---

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

---

diff --git a/src/modules/auth_arnacon/Makefile 
b/src/modules/auth_arnacon/Makefile
index 81093c8da66..bc50470a937 100644
--- a/src/modules/auth_arnacon/Makefile
+++ b/src/modules/auth_arnacon/Makefile
@@ -10,6 +10,23 @@ LIBS=
 DEFS+=-DKAMAILIO_MOD -DDISABLE_NAGLE
 
 # Link with curl and secp256k1
-LIBS+=-lcurl -lsecp256k1
+ifeq ($(CROSS_COMPILE),)
+CURL_BUILDER=$(shell \
+       if pkg-config --exists libcurl; then \
+               echo 'pkg-config libcurl'; \
+       else \
+               which curl-config; \
+       fi)
+endif
+
+ifneq ($(CURL_BUILDER),)
+       DEFS+= $(shell $(CURL_BUILDER) --cflags )
+       LIBS+= $(shell $(CURL_BUILDER) --libs)
+else
+       DEFS+= -I$(LOCALBASE)/include
+       LIBS+= -L$(LOCALBASE)/lib -lcurl
+endif
+
+LIBS+= -lsecp256k1
 
 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