]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-353: add testing hack to use system xmlrpc-c
authorMichael Jerris <mike@jerris.com>
Mon, 17 Mar 2014 18:33:48 +0000 (14:33 -0400)
committerMichael Jerris <mike@jerris.com>
Mon, 17 Mar 2014 18:33:55 +0000 (14:33 -0400)
configure.ac
src/mod/xml_int/mod_xml_rpc/Makefile.am

index 666ef0839825687dd863fd3e3f9eabe32be62738..812834e09a97a55177b9efd9d1e338ce7afbf596 100644 (file)
@@ -404,6 +404,19 @@ AC_ARG_ENABLE(cpp,
 
 AM_CONDITIONAL([ENABLE_CPP],[test "${enable_cpp}" = "yes"])
 
+AC_ARG_ENABLE([system-xmlrpc-c],
+  [AS_HELP_STRING([--enable-system-xmlrpc-c],
+    [use system lib for xmlrpc-c])],,
+  [enable_xmlrpcc="no"])
+
+if test "${enable_xmlrpcc}" = "yes" ; then
+SYS_XMLRPC_CFLAGS=`xmlrpc-c-config --cflags`
+SYS_XMLRPC_LDFLAGS=`xmlrpc-c-config --libs`
+fi
+AC_SUBST(SYS_XMLRPC_CFLAGS)
+AC_SUBST(SYS_XMLRPC_LDFLAGS)
+AM_CONDITIONAL([SYSTEM_XMLRPCC],[test "${enable_xmlrpcc}" = "yes"])
+
 AC_ARG_ENABLE(srtp,
 [AC_HELP_STRING([--disable-srtp],[build without srtp support])],[enable_srtp="$enableval"],[enable_srtp="yes"])
 
index 58ecf6d21c3e4a01391ee13830cb844cdad530d9..479d76a355fa18763cefeec5263e3c1e0eb0170e 100644 (file)
@@ -1,17 +1,20 @@
 include $(top_srcdir)/build/modmake.rulesam
 MODNAME=mod_xml_rpc
 
-MAKEFLAGS=-j1
-XMLRPC_DIR=$(switch_srcdir)/libs/xmlrpc-c
-
 mod_LTLIBRARIES = mod_xml_rpc.la
-mod_xml_rpc_la_SOURCES  = mod_xml_rpc.c
-mod_xml_rpc_la_CFLAGS   = $(AM_CFLAGS) -I. -w -I$(XMLRPC_DIR)/lib/expat/xmlparse 
-mod_xml_rpc_la_CFLAGS  += -I$(XMLRPC_DIR)/lib/expat/xmltok -I$(XMLRPC_DIR) -I$(XMLRPC_DIR)/include 
-mod_xml_rpc_la_CFLAGS  += -I$(XMLRPC_DIR)/lib/abyss/src -I$(XMLRPC_DIR)/lib/util/include -D_THREAD -D__EXTENSIONS__ -D_GNU_SOURCE
+mod_xml_rpc_la_SOURCES  = mod_xml_rpc.c ws.c
+mod_xml_rpc_la_CFLAGS   = $(AM_CFLAGS) -I. -w
 mod_xml_rpc_la_LIBADD   = $(switch_builddir)/libfreeswitch.la
 mod_xml_rpc_la_LDFLAGS  = -avoid-version -module -no-undefined -shared
 
+if SYSTEM_XMLRPCC
+mod_xml_rpc_la_CFLAGS+=$(SYS_XMLRPC_CFLAGS)
+mod_xml_rpc_la_LDFLAGS+=$(SYS_XMLRPC_LDFLAGS)
+else
+MAKEFLAGS=-j1
+XMLRPC_DIR=$(switch_srcdir)/libs/xmlrpc-c
+mod_xml_rpc_la_CFLAGS  +=  -I$(XMLRPC_DIR)/lib/expat/xmlparse -I$(XMLRPC_DIR)/lib/expat/xmltok -I$(XMLRPC_DIR) -I$(XMLRPC_DIR)/include 
+mod_xml_rpc_la_CFLAGS  += -I$(XMLRPC_DIR)/lib/abyss/src -I$(XMLRPC_DIR)/lib/util/include -D_THREAD -D__EXTENSIONS__ -D_GNU_SOURCE
 mod_xml_rpc_la_SOURCES += ../../../../libs/xmlrpc-c/src/version.c\
 ../../../../libs/xmlrpc-c/lib/libutil/asprintf.c\
 ../../../../libs/xmlrpc-c/lib/util/casprintf.c\
@@ -71,8 +74,7 @@ mod_xml_rpc_la_SOURCES += ../../../../libs/xmlrpc-c/src/version.c\
 ../../../../libs/xmlrpc-c/src/xmlrpc_server_cgi.c\
 ../../../../libs/xmlrpc-c/src/xmlrpc_string.c\
 ../../../../libs/xmlrpc-c/src/xmlrpc_struct.c\
-../../../../libs/xmlrpc-c/lib/expat/xmltok/xmltok.c\
-ws.c
+../../../../libs/xmlrpc-c/lib/expat/xmltok/xmltok.c
 
 BUILT_SOURCES=$(XMLRPC_DIR)/version.h $(XMLRPC_DIR)/lib/expat/xmltok/nametab.h
 $(XMLRPC_DIR)/lib/expat/xmltok/xmltok.o: $(XMLRPC_DIR)/lib/expat/xmltok/nametab.h
@@ -90,7 +92,6 @@ $(XMLRPC_DIR)/version.h:
 
 clean:
        cd $(XMLRPC_DIR) && $(MAKE) clean
-
-
+endif