summaryrefslogtreecommitdiff
path: root/ext/soap/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/config.m4')
-rw-r--r--ext/soap/config.m441
1 files changed, 14 insertions, 27 deletions
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