Module: sip-router
Branch: master
Commit: 5969fc96aac2ae61f1171c704e98a681f2679ed4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5969fc9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Sep 9 10:25:02 2011 +0200
xcap_client: use curl-config to get include and lib compile flags
---
modules_k/xcap_client/Makefile | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules_k/xcap_client/Makefile b/modules_k/xcap_client/Makefile
index d275d47..d3f513e 100644
--- a/modules_k/xcap_client/Makefile
+++ b/modules_k/xcap_client/Makefile
@@ -10,9 +10,19 @@ auto_gen=
NAME=xcap_client.so
LIBS=
-DEFS+=-I$(LOCALBASE)/include
+CURLCFG=$(shell which curl-config)
-LIBS+=-L$(SYSBASE)/lib -L$(LOCALBASE)/lib -lcurl
+ifneq ($(CURLCFG),)
+
+ DEFS += $(shell $(CURLCFG) --cflags)
+ LIBS += $(shell $(CURLCFG) --libs)
+
+else
+
+ DEFS+=-I$(LOCALBASE)/include
+ LIBS+=-L$(SYSBASE)/lib -L$(LOCALBASE)/lib -lcurl
+
+endif
DEFS+=-DOPENSER_MOD_INTERFACE