Module: kamailio
Branch: master
Commit: 50e1bb819aa2cccd576722c879fa7231d894d8cd
URL:
https://github.com/kamailio/kamailio/commit/50e1bb819aa2cccd576722c879fa723…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-01-07T13:09:06+01:00
mqtt: Makefile split check for pkg-config
libev doesn't have pkg-config file .pc on Debian
---
Modified: src/modules/mqtt/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/50e1bb819aa2cccd576722c879fa723…
Patch:
https://github.com/kamailio/kamailio/commit/50e1bb819aa2cccd576722c879fa723…
---
diff --git a/src/modules/mqtt/Makefile b/src/modules/mqtt/Makefile
index dfe4be0cf4..882b3a5890 100644
--- a/src/modules/mqtt/Makefile
+++ b/src/modules/mqtt/Makefile
@@ -8,25 +8,34 @@ NAME=mqtt.so
ifeq ($(CROSS_COMPILE),)
BUILDER = $(shell which pkg-config)
ifneq ($(BUILDER),)
- PKGLIBUV = $(shell $(BUILDER) --exists libmosquitto > /dev/null 2>&1 ; echo
$$? )
-ifneq ($(PKGLIBUV),0)
- BUILDER =
-endif
+ PKGLIBMO = $(shell $(BUILDER) --exists libmosquitto > /dev/null 2>&1 ; echo
$$? )
+ PKGLIBEV = $(shell $(BUILDER) --exists libev > /dev/null 2>&1 ; echo $$? )
endif
endif
-ifneq ($(BUILDER),)
+ifeq ($(PKGLIBMO),0)
DEFS += $(shell $(BUILDER) --cflags libmosquitto)
LIBS += $(shell $(BUILDER) --libs libmosquitto)
+else
+ifneq (,$(findstring darwin,$(OS)))
+ DEFS += -I/opt/local/include -I$(LOCALBASE)/include
+ LIBS += -L/opt/local/lib -L$(LOCALBASE)/lib -lmosquitto
+else
+ DEFS += -I$(LOCALBASE)/include -I$(SYSBASE)/include
+ LIBS += -L$(LOCALBASE)/lib -L$(SYSBASE)/lib -lmosquitto
+endif
+endif
+
+ifeq ($(PKGLIBEV),0)
DEFS += $(shell $(BUILDER) --cflags libev)
LIBS += $(shell $(BUILDER) --libs libev)
else
ifneq (,$(findstring darwin,$(OS)))
DEFS += -I/opt/local/include -I$(LOCALBASE)/include
- LIBS += -L/opt/local/lib -L$(LOCALBASE)/lib -lmosquitto -lev
+ LIBS += -L/opt/local/lib -L$(LOCALBASE)/lib -lev
else
DEFS += -I$(LOCALBASE)/include -I$(SYSBASE)/include
- LIBS += -L$(LOCALBASE)/lib -L$(SYSBASE)/lib -lmosquitto -lev
+ LIBS += -L$(LOCALBASE)/lib -L$(SYSBASE)/lib -lev
endif
endif