Module: kamailio
Branch: master
Commit: 4a40dd39cec713c569dc3480c905d808026aad39
URL:
https://github.com/kamailio/kamailio/commit/4a40dd39cec713c569dc3480c905d80…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-03-26T11:05:26+01:00
ndb_redis: fix for broken output of pkg-config for hiredis
---
Modified: modules/ndb_redis/Makefile
---
Diff:
https://github.com/kamailio/kamailio/commit/4a40dd39cec713c569dc3480c905d80…
Patch:
https://github.com/kamailio/kamailio/commit/4a40dd39cec713c569dc3480c905d80…
---
diff --git a/modules/ndb_redis/Makefile b/modules/ndb_redis/Makefile
index 524647d..5874c31 100644
--- a/modules/ndb_redis/Makefile
+++ b/modules/ndb_redis/Makefile
@@ -7,10 +7,8 @@ NAME=ndb_redis.so
ifeq ($(CROSS_COMPILE),)
HIREDIS_BUILDER = $(shell \
- if pkg-config --exists libcre; then \
+ if pkg-config --exists hiredis; then \
echo 'pkg-config hiredis'; \
- else \
- which pcre-config; \
fi)
endif
@@ -20,6 +18,12 @@ ifeq ($(HIREDIS_BUILDER),)
else
HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
+
+ifeq ($(HIREDISLIBS),-L -lhiredis)
+ HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags) /opt/local/include
+ HIREDISLIBS = -L/opt/local/lib -lhiredis
+endif
+
endif
DEFS+=$(HIREDISDEFS)