Module: kamailio
Branch: master
Commit: 162ccdaeeb6bff185f49b3dc2e2b9b43687ec0fc
URL: 
https://github.com/kamailio/kamailio/commit/162ccdaeeb6bff185f49b3dc2e2b9b43687ec0fc

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2016-03-26T10:23:02+01:00

cnxcc: use pkg-config for hiredis lib compile flags

---

Modified: modules/cnxcc/Makefile

---

Diff:  
https://github.com/kamailio/kamailio/commit/162ccdaeeb6bff185f49b3dc2e2b9b43687ec0fc.diff
Patch: 
https://github.com/kamailio/kamailio/commit/162ccdaeeb6bff185f49b3dc2e2b9b43687ec0fc.patch

---

diff --git a/modules/cnxcc/Makefile b/modules/cnxcc/Makefile
index e5c69df..af6979e 100644
--- a/modules/cnxcc/Makefile
+++ b/modules/cnxcc/Makefile
@@ -1,14 +1,33 @@
 #
 # cnxcc module makefile
 #
-# 
+#
 # WARNING: do not run this directly, it should be run by the master Makefile
 
 include ../../Makefile.defs
 auto_gen=
 NAME=cnxcc.so
 
-LIBS=-lhiredis -levent
+ifeq ($(CROSS_COMPILE),)
+HIREDIS_BUILDER = $(shell \
+       if pkg-config --exists libcre; then \
+               echo 'pkg-config hiredis'; \
+       else \
+               which pcre-config; \
+       fi)
+endif
+
+ifeq ($(HIREDIS_BUILDER),)
+       HIREDISDEFS=-I$(LOCALBASE)/include
+       HIREDISLIBS=-L$(LOCALBASE)/lib -lhiredis
+else
+       HIREDISDEFS = $(shell $(HIREDIS_BUILDER) --cflags)
+       HIREDISLIBS = $(shell $(HIREDIS_BUILDER) --libs)
+endif
+
+DEFS+=$(HIREDISDEFS)
+LIBS=$(HIREDISLIBS) -levent
+
 DEFS+=-DOPENSER_MOD_INTERFACE
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to