[sr-dev] git:5.6:b064a135: slack: Makefile - support for FreeBSD build

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 16 09:38:39 CEST 2022


Module: kamailio
Branch: 5.6
Commit: b064a1357e6a771eb4755824a42d842a85bda410
URL: https://github.com/kamailio/kamailio/commit/b064a1357e6a771eb4755824a42d842a85bda410

Author: drTr0jan <drtr0jan at yandex.ru>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-06-16T09:31:40+02:00

slack: Makefile - support for FreeBSD build

- added LIBS and DEFS variables, making them consistent with
the rest of modules.

(cherry picked from commit 36baa8cda606e107308303c33c5b98cbb513c653)

---

Modified: src/modules/slack/Makefile

---

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

---

diff --git a/src/modules/slack/Makefile b/src/modules/slack/Makefile
index 9bc748a2e5c..a4f0c1ff814 100644
--- a/src/modules/slack/Makefile
+++ b/src/modules/slack/Makefile
@@ -8,5 +8,21 @@ include ../../Makefile.defs
 auto_gen=
 NAME=slack.so
 
+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
 
 include ../../Makefile.modules




More information about the sr-dev mailing list