summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2003-01-09 01:19:26 +0000
committerYasuo Ohgaki <yohgaki@php.net>2003-01-09 01:19:26 +0000
commitae8db8c608e1bf981ebd1358b2d4292ca050dd6e (patch)
tree932f881cdb03cb96f089d71d4eeb8c3954b18d70
parent66fd5008ab10fa40a8261e2cee50622567e4e600 (diff)
downloadphp-git-ae8db8c608e1bf981ebd1358b2d4292ca050dd6e.tar.gz
Adjust config.m4 for new build system and improve lib detection a little
-rw-r--r--ext/soap/config.m429
1 files changed, 25 insertions, 4 deletions
diff --git a/ext/soap/config.m4 b/ext/soap/config.m4
index 44c12cb037..3d5672b3fb 100644
--- a/ext/soap/config.m4
+++ b/ext/soap/config.m4
@@ -7,10 +7,31 @@ dnl without editing.
PHP_ARG_ENABLE(soap, whether to enable soap support,
Make sure that the comment is aligned:
-[ --enable-soap Enable soap support])
+[ --enable-soap[=DIR] Enable soap support. DIR is libxml2
+ library directory.])
if test "$PHP_SOAP" != "no"; then
- PHP_ADD_INCLUDE(/usr/local/include/libxml2)
- PHP_ADD_LIBRARY_WITH_PATH(xml2,/usr/local/lib,SOAP_SHARED_LIBADD)
- PHP_EXTENSION(soap, $ext_shared)
+ 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)
fi