modules/mi_xmlrpc/Makefile
d70cf5d6
 # WARNING: do not run this directly, it should be run by the master Makefile
 
 include ../../Makefile.defs
 auto_gen=
 NAME=mi_xmlrpc.so
 LIBS=
 
2894c983
 NEW_VERSION_THRESHOLD_UP=10630         # 1.06.30
d6e664b8
 NEW_VERSION_THRESHOLD_DOWN=10310       # 1.03.10
 
 OLD_VERSION_THRESHOLD_UP=910           # 0.09.10
 OLD_VERSION_THRESHOLD_DOWN=901         # 0.09.10
 
 
71c9b74d
 # set CROSS_COMPILE to true if you want to skip
 # the autodetection
 # CROSS_COMPILE=true
 
 ifeq ($(CROSS_COMPILE),)
d6e664b8
 XMLRPC-C-CONFIG=$(shell which xmlrpc-c-config)
71c9b74d
 endif
d6e664b8
 
71c9b74d
 ifneq ($(XMLRPC-C-CONFIG),)
 # get the version
d6e664b8
 XMLRPC_VER=$(shell $(XMLRPC-C-CONFIG) --version)
71c9b74d
 else
 # try new version
 XMLRPC_VER=1.03.10
 endif
d6e664b8
 
 XMLRPC_VERSION=$(shell echo $(XMLRPC_VER) | sed  "s/\.\([0-9]\)\./.0\1./g" | sed  "s/\.\([0-9]\)\$$/.0\1/g" | tr -d "." | sed -e "s/^0*//" )
 
 
 # check the versions
6da76c0e
 OLD=$(shell echo $(XMLRPC_VERSION) $(OLD_VERSION_THRESHOLD_UP) $(OLD_VERSION_THRESHOLD_DOWN) | awk '{ if (($$1 <= $$2) && ($$1 >= $$3)) print "yes"}' )
 NEW=$(shell echo $(XMLRPC_VERSION) $(NEW_VERSION_THRESHOLD_UP) $(NEW_VERSION_THRESHOLD_DOWN) | awk '{ if (($$1 <= $$2) && ($$1 >= $$3)) print "yes"}' )
d6e664b8
 
 
 # supported version ?
 ifeq ($(OLD),yes)
 	DEFS+=-DXMLRPC_OLD_VERSION
 else
 ifeq ($(NEW),yes)
 	# nothing to do
b3dedff1
 #else
 #$(warning			You are using an unsupported libxmlrpc-c3 \
d6e664b8
 					 version  ($(XMLRPC_VER)), compile at your own risk!)
 endif
 endif
 
71c9b74d
 ifneq ($(XMLRPC-C-CONFIG),)
7721f9ff
 MY_DEFS=$(shell $(XMLRPC-C-CONFIG) abyss-server --cflags)
 MY_LIBS=$(shell $(XMLRPC-C-CONFIG) abyss-server --libs)
71c9b74d
 else
7721f9ff
 MY_DEFS=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/xmlrpc-c \
 		-I$(SYSBASE)/include/xmlrpc-c -D_UNIX
 MY_LIBS=-L$(SYSBASE)/lib  -L$(LOCALBASE)/lib -lxmlrpc -lxmlrpc_xmlparse \
71c9b74d
 		-lxmlrpc_xmltok -lxmlrpc_abyss -lxmlrpc_abyss_server \
 		-lxmlrpc_client -lwwwinit -lwwwstream -lwwwxml \
 		-lwwwapp -lwwwcache -lwwwcore -lwwwdir -lwwwfile \
 		-lwwwftp -lwwwgopher -lwwwhtml -lwwwhttp \
 		-lwwwmime -lwwwmux -lwwwnews -lwwwtelnet \
 		-lwwwtrans -lwwwzip
 endif
d6e664b8
 
7721f9ff
 ifeq ($(NEW),yes)
 	# remove the abyss library - we already have
 	# the code in the module
 	MY_DEFS+=-D_UNIX
d76ade0b
 	MY_LIBS:=$(filter-out %xmlrpc_abyss %xmlrpc_server_abyss %pthread, $(MY_LIBS))
7721f9ff
 else
 	# remove from compiling the code we have in the
 	# module for abyss server
 	exclude_files=$(wildcard abyss_*.c)
 endif
 
5c1fabab
 # Solaris has filio.h
 ifeq ($(OS),solaris)
 	MY_DEFS+=-DHAVE_SYS_FILIO_H
 endif
7721f9ff
 
 DEFS+=$(MY_DEFS)
 LIBS+=$(MY_LIBS)
 
d70cf5d6
 
5e886dbb
 DEFS+=-DKAMAILIO_MOD_INTERFACE
4952ec4b
 
8c126cce
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi
d70cf5d6
 include ../../Makefile.modules
d6e664b8