Skip to content

Commit

Permalink
ndb_redis: fix for broken output of pkg-config for hiredis
Browse files Browse the repository at this point in the history
(cherry picked from commit 4a40dd3)
  • Loading branch information
miconda committed Mar 28, 2016
1 parent b53bf97 commit b04d257
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/ndb_redis/Makefile
Expand Up @@ -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

Expand All @@ -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)
Expand Down

0 comments on commit b04d257

Please sign in to comment.