[sr-dev] git:master:36baa8cd: slack: Makefile - support for FreeBSD build

drTr0jan drtr0jan at yandex.ru
Tue May 31 18:43:37 CEST 2022


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

Author: drTr0jan <drtr0jan at yandex.ru>
Committer: drTr0jan <drtr0jan at yandex.ru>
Date: 2022-05-31T19:08:29+03:00

slack: Makefile - support for FreeBSD build

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

---

Modified: src/modules/slack/Makefile

---

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

---

diff --git a/src/modules/slack/Makefile b/src/modules/slack/Makefile
index 9bc748a2e5..a4f0c1ff81 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