5 sinclude(ext/xmlrpc/libxmlrpc/acinclude.m4)
6 sinclude(ext/xmlrpc/libxmlrpc/xmlrpc.m4)
7 sinclude(libxmlrpc/acinclude.m4)
8 sinclude(libxmlrpc/xmlrpc.m4)
10 PHP_ARG_WITH(xmlrpc, for XMLRPC-EPI support,
11 [ --with-xmlrpc[=DIR] Include XMLRPC-EPI support.])
13 PHP_ARG_WITH(expat-dir, libexpat dir for XMLRPC-EPI,
14 [ --with-expat-dir=DIR XMLRPC-EPI: libexpat dir for XMLRPC-EPI.],no,no)
16 PHP_ARG_WITH(iconv-dir, iconv dir for XMLRPC-EPI,
17 [ --with-iconv-dir=DIR XMLRPC-EPI: iconv dir for XMLRPC-EPI.],no,no)
19 if test "$PHP_XMLRPC" != "no"; then
21 PHP_SUBST(XMLRPC_SHARED_LIBADD)
22 AC_DEFINE(HAVE_XMLRPC,1,[ ])
25 for i in $PHP_EXPAT_DIR $XMLRPC_DIR /usr/local /usr; do
26 if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME; then
27 AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
28 PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib, XMLRPC_SHARED_LIBADD)
29 PHP_ADD_INCLUDE($i/include)
35 if test "$testval" = "no"; then
36 AC_MSG_ERROR(XML-RPC support requires libexpat. Use --with-expat-dir=<DIR>)
39 if test "$PHP_ICONV_DIR" != "no"; then
40 PHP_ICONV=$PHP_ICONV_DIR
43 if test "$PHP_ICONV" = "no"; then
47 PHP_SETUP_ICONV(XMLRPC_SHARED_LIBADD, [], [
48 AC_MSG_ERROR([iconv not found, in order to build xmlrpc you need the iconv library])
53 if test "$PHP_XMLRPC" = "yes"; then
55 PHP_NEW_EXTENSION(xmlrpc,xmlrpc-epi-php.c libxmlrpc/base64.c \
56 libxmlrpc/simplestring.c libxmlrpc/xml_to_dandarpc.c \
57 libxmlrpc/xmlrpc_introspection.c libxmlrpc/encodings.c \
58 libxmlrpc/system_methods.c libxmlrpc/xml_to_xmlrpc.c \
59 libxmlrpc/queue.c libxmlrpc/xml_element.c libxmlrpc/xmlrpc.c \
60 libxmlrpc/xml_to_soap.c,$ext_shared,,
61 -I@ext_srcdir@/libxmlrpc -DVERSION="0.50")
62 PHP_ADD_BUILD_DIR($ext_builddir/libxmlrpc)
63 XMLRPC_MODULE_TYPE=builtin
65 elif test "$PHP_XMLRPC" != "no"; then
67 if test -r $PHP_XMLRPC/include/xmlrpc.h; then
68 XMLRPC_DIR=$PHP_XMLRPC/include
69 elif test -r $PHP_XMLRPC/include/xmlrpc-epi/xmlrpc.h; then
70 dnl some xmlrpc-epi header files have generic file names like
71 dnl queue.h or base64.h. Distributions have to create dir
72 dnl for xmlrpc-epi because of this.
73 XMLRPC_DIR=$PHP_XMLRPC/include/xmlrpc-epi
75 AC_MSG_CHECKING(for XMLRPC-EPI in default path)
76 for i in /usr/local /usr; do
77 if test -r $i/include/xmlrpc.h; then
79 AC_MSG_RESULT(found in $i)
85 if test -z "$XMLRPC_DIR"; then
86 AC_MSG_RESULT(not found)
87 AC_MSG_ERROR(Please reinstall the XMLRPC-EPI distribution)
90 PHP_ADD_INCLUDE($XMLRPC_DIR)
91 PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_DIR/lib, XMLRPC_SHARED_LIBADD)