summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/soap/config-php4.m433
-rw-r--r--ext/soap/config.m441
-rw-r--r--ext/soap/config.w327
-rw-r--r--ext/soap/php_encoding.c6
-rw-r--r--ext/soap/php_xml.c2
-rw-r--r--ext/soap/php_xml.h2
-rw-r--r--ext/soap/readme.html2
-rw-r--r--ext/soap/soap.c5
8 files changed, 63 insertions, 35 deletions
diff --git a/ext/soap/config-php4.m4 b/ext/soap/config-php4.m4
new file mode 100644
index 0000000000..332acac91d
--- /dev/null
+++ b/ext/soap/config-php4.m4
@@ -0,0 +1,33 @@
+dnl $Id$
+dnl config.m4 for extension soap
+
+PHP_ARG_WITH(soap, whether to enable soap support,
+[ --with-soap[=DIR] Include SOAP support. DIR is libxml2
+ library directory.])
+
+if test "$PHP_SOAP" != "no"; then
+ if test "$PHP_SOAP" = "yes"; then
+ for i in /usr/local /usr; do
+ if test -d "$i/include/libxml2/libxml"; then
+ XML2_INCDIR=$i/include/libxml2
+ XML2_LIBDIR=$i/lib
+ fi
+ done
+ else
+ if test -d "$PHP_SOAP/include/libxml2/libxml"; then
+ XML2_INCDIR=$PHP_SOAP/include/libxml2
+ XML2_LIBDIR=$PHP_SOAP/lib
+ fi
+ fi
+
+ if test -z "$XML2_INCDIR"; then
+ AC_MSG_ERROR(Cannot find libxml2 header. Please specify correct libxml2 installation path)
+ fi
+
+ AC_DEFINE(HAVE_PHP_SOAP,1,[Whether you have soap module])
+
+ PHP_ADD_INCLUDE($XML2_INCDIR)
+ PHP_ADD_LIBRARY_WITH_PATH(xml2,$XML2_LIBDIR,SOAP_SHARED_LIBADD)
+ PHP_NEW_EXTENSION(soap, soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c, $ext_shared)
+ PHP_SUBST(SOAP_SHARED_LIBADD)
+fi
diff --git a/ext/soap/config.m4 b/ext/soap/config.m4
index 0b27165bcb..5d719a7caa 100644
--- a/ext/soap/config.m4
+++ b/ext/soap/config.m4
@@ -1,33 +1,20 @@
dnl $Id$
dnl config.m4 for extension soap
-PHP_ARG_ENABLE(soap, whether to enable soap support,
-[ --enable-soap[=DIR] Enable soap support. DIR is libxml2
- library directory.])
+PHP_ARG_WITH(soap, whether to enable soap support,
+[ --with-soap Include SOAP support.])
-if test "$PHP_SOAP" != "no"; then
- if test "$PHP_SOAP" = "yes"; then
- for i in /usr/local /usr; do
- if test -d "$i/include/libxml2/libxml"; then
- XML2_INCDIR=$i/include/libxml2
- XML2_LIBDIR=$i/lib
- fi
- done
- else
- if test -d "$PHP_SOAP/include/libxml2/libxml"; then
- XML2_INCDIR=$PHP_SOAP/include/libxml2
- XML2_LIBDIR=$PHP_SOAP/lib
- fi
- fi
-
- if test -z "$XML2_INCDIR"; then
- AC_MSG_ERROR(Cannot find libxml2 header. Please specify correct libxml2 installation path)
- fi
-
- AC_DEFINE(HAVE_PHP_SOAP,1,[Whether you have soap module])
+if test -z "$PHP_LIBXML_DIR"; then
+ PHP_ARG_WITH(libxml-dir, libxml2 install dir,
+ [ --with-libxml-dir=DIR XML: libxml2 install prefix], no, no)
+fi
- PHP_ADD_INCLUDE($XML2_INCDIR)
- PHP_ADD_LIBRARY_WITH_PATH(xml2,$XML2_LIBDIR,SOAP_SHARED_LIBADD)
- PHP_NEW_EXTENSION(soap, soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c, $ext_shared)
- PHP_SUBST(SOAP_SHARED_LIBADD)
+if test "$PHP_SOAP" != "no" && test "$PHP_LIBXML" != "no"; then
+ PHP_SETUP_LIBXML(SOAP_SHARED_LIBADD, [
+ AC_DEFINE(HAVE_SOAP,1,[ ])
+ PHP_NEW_EXTENSION(soap, soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c, $ext_shared)
+ PHP_SUBST(SOAP_SHARED_LIBADD)
+ ], [
+ AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
+ ])
fi
diff --git a/ext/soap/config.w32 b/ext/soap/config.w32
index f579f32a04..c156921cae 100644
--- a/ext/soap/config.w32
+++ b/ext/soap/config.w32
@@ -1,14 +1,15 @@
// $Id$
// vim:ft=javascript
-ARG_ENABLE("soap", "SOAP support", "no");
+ARG_WITH("soap", "SOAP support", "no");
-if (PHP_SOAP != "no" && PHP_LIBXML == "yes") {
+if (PHP_SOAP == "yes" && PHP_LIBXML == "yes") {
EXTENSION('soap', 'soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c');
- AC_DEFINE('HAVE_PHP_SOAP', 1);
+ AC_DEFINE('HAVE_PHP_SOAP', 1, "SOAP support");
if (!PHP_SOAP_SHARED) {
ADD_FLAG('CFLAGS_SOAP', "/D LIBXML_STATIC ");
}
+ ADD_EXTENSION_DEP('soap', 'libxml');
}
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 2978990c02..f4341eccb9 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -1992,10 +1992,14 @@ static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *forma
}
/* Time zone support */
-#if HAVE_TM_GMTOFF
+#ifdef HAVE_TM_GMTOFF
sprintf(tzbuf, "%c%02d%02d", (ta->tm_gmtoff < 0) ? '-' : '+', abs(ta->tm_gmtoff / 3600), abs( (ta->tm_gmtoff % 3600) / 60 ));
#else
+# ifdef ZEND_WIN32
+ sprintf(tzbuf, "%c%02d%02d", ((ta->tm_isdst ? timezone - 3600:timezone)>0)?'-':'+', abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs(((ta->tm_isdst ? timezone - 3600 : timezone) % 3600) / 60));
+# else
sprintf(tzbuf, "%c%02d%02d", ((ta->tm_isdst ? tzone - 3600:tzone)>0)?'-':'+', abs((ta->tm_isdst ? tzone - 3600 : tzone) / 3600), abs(((ta->tm_isdst ? tzone - 3600 : tzone) % 3600) / 60));
+# endif
#endif
if (strcmp(tzbuf,"+0000") == 0) {
strcpy(tzbuf,"Z");
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index 6912be670c..6fc82ec44e 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -162,6 +162,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
return ret;
}
+#ifndef ZEND_ENGINE_2
int php_stream_xmlIO_match_wrapper(const char *filename)
{
TSRMLS_FETCH();
@@ -185,6 +186,7 @@ int php_stream_xmlIO_close(void *context)
TSRMLS_FETCH();
return php_stream_close((php_stream*)context);
}
+#endif
xmlNsPtr attr_find_ns(xmlAttrPtr node)
{
diff --git a/ext/soap/php_xml.h b/ext/soap/php_xml.h
index 4ec1600b44..dfb31ffad2 100644
--- a/ext/soap/php_xml.h
+++ b/ext/soap/php_xml.h
@@ -44,10 +44,12 @@ xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns
xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
int parse_namespace(const char *inval,char **value,char **namespace);
+#ifndef ZEND_ENGINE_2
int php_stream_xmlIO_match_wrapper(const char *filename);
void *php_stream_xmlIO_open_wrapper(const char *filename);
int php_stream_xmlIO_read(void *context, char *buffer, int len);
int php_stream_xmlIO_close(void *context);
+#endif
#define FOREACHATTRNODE(n,c,i) FOREACHATTRNODEEX(n,c,NULL,i)
#define FOREACHATTRNODEEX(n,c,ns,i) \
diff --git a/ext/soap/readme.html b/ext/soap/readme.html
index e636cb09e2..4675337ec9 100644
--- a/ext/soap/readme.html
+++ b/ext/soap/readme.html
@@ -28,7 +28,7 @@ TD:{
This extension makes use of the <A HREF="http://www.xmlsoft.org" TARGET="_top">GNOME XML library</A>. Download and install this library. You will need at least libxml-2.5.4.
<HR>
<H2>Installation</H2>
-<I>FIXME</I>
+This extension is only available if PHP was configured with --with-soap.
<HR>
<H2>Predefined Constants</H2>
The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 7e8cf86f0c..55082571b0 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -356,10 +356,12 @@ PHP_MINIT_FUNCTION(soap)
/* TODO: add ini entry for always use soap errors */
ZEND_INIT_MODULE_GLOBALS(soap, php_soap_init_globals, NULL);
+#ifndef ZEND_ENGINE_2
/* Enable php stream/wrapper support for libxml */
xmlRegisterDefaultInputCallbacks();
xmlRegisterInputCallbacks(php_stream_xmlIO_match_wrapper, php_stream_xmlIO_open_wrapper,
php_stream_xmlIO_read, php_stream_xmlIO_close);
+#endif
/* Register SoapClient class */
/* BIG NOTE : THIS EMITS AN COMPILATION WARNING UNDER ZE2 - handle_function_call deprecated.
@@ -495,9 +497,6 @@ PHP_MINFO_FUNCTION(soap)
php_info_print_table_start();
php_info_print_table_row(2, "Soap Client", "enabled");
php_info_print_table_row(2, "Soap Server", "enabled");
-#if HAVE_PHP_SESSION
- php_info_print_table_row(2, "Soap Serializer", "enabled");
-#endif
php_info_print_table_end();
}