Module: kamailio Branch: master Commit: fa0d3267890e77a5184490d11f76fe4cb400e2df URL: https://github.com/kamailio/kamailio/commit/fa0d3267890e77a5184490d11f76fe4c...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-03-26T11:11:25+01:00
cnxcc: use pkg-config for libevent compile flags
---
Modified: modules/cnxcc/Makefile
---
Diff: https://github.com/kamailio/kamailio/commit/fa0d3267890e77a5184490d11f76fe4c... Patch: https://github.com/kamailio/kamailio/commit/fa0d3267890e77a5184490d11f76fe4c...
---
diff --git a/modules/cnxcc/Makefile b/modules/cnxcc/Makefile index af6979e..7748a37 100644 --- a/modules/cnxcc/Makefile +++ b/modules/cnxcc/Makefile @@ -10,10 +10,8 @@ NAME=cnxcc.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
@@ -23,10 +21,31 @@ 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 + +ifeq ($(CROSS_COMPILE),) +LEVENT_BUILDER = $(shell \ + if pkg-config --exists libevent; then \ + echo 'pkg-config libevent'; \ + fi) +endif + +ifeq ($(LEVENT_BUILDER),) + LEVENTDEFS= + LEVENTLIBS=-L$(LOCALBASE)/lib -levent +else + LEVENTDEFS = $(shell $(LEVENT_BUILDER) --cflags) + LEVENTLIBS = $(shell $(LEVENT_BUILDER) --libs) endif
-DEFS+=$(HIREDISDEFS) -LIBS=$(HIREDISLIBS) -levent +DEFS+=$(HIREDISDEFS) $(LEVENTDEFS) +LIBS=$(HIREDISLIBS) $(LEVENTLIBS)
DEFS+=-DOPENSER_MOD_INTERFACE SERLIBPATH=../../lib