From b064a1357e6a771eb4755824a42d842a85bda410 Mon Sep 17 00:00:00 2001 From: drTr0jan Date: Tue, 31 May 2022 19:07:59 +0300 Subject: [PATCH] slack: Makefile - support for FreeBSD build - added LIBS and DEFS variables, making them consistent with the rest of modules. (cherry picked from commit 36baa8cda606e107308303c33c5b98cbb513c653) --- src/modules/slack/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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