From 714e3133e71028778c90f3d0014f2b8d6b745404 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 17 Mar 2014 14:33:48 -0400 Subject: [PATCH] FS-353: add testing hack to use system xmlrpc-c --- configure.ac | 13 +++++++++++++ src/mod/xml_int/mod_xml_rpc/Makefile.am | 23 ++++++++++++----------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 666ef08398..812834e09a 100644 --- a/configure.ac +++ b/configure.ac @@ -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"]) diff --git a/src/mod/xml_int/mod_xml_rpc/Makefile.am b/src/mod/xml_int/mod_xml_rpc/Makefile.am index 58ecf6d21c..479d76a355 100644 --- a/src/mod/xml_int/mod_xml_rpc/Makefile.am +++ b/src/mod/xml_int/mod_xml_rpc/Makefile.am @@ -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