From 08218f50828193ee67bbec38e51b3ed4f8361bac Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 5 Dec 2003 21:16:47 +0000 Subject: [PATCH] Tweak xml related build. Still some warnings for ext/xsl, but I'll leave that to someone else for now. --- ext/dom/config.w32 | 3 +++ ext/libxml/config.w32 | 3 ++- ext/simplexml/config.w32 | 3 +++ ext/xml/config.w32 | 3 +++ ext/xsl/config.w32 | 14 +++++++++++--- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ext/dom/config.w32 b/ext/dom/config.w32 index e38f823cdf..5dfb81ced1 100644 --- a/ext/dom/config.w32 +++ b/ext/dom/config.w32 @@ -13,6 +13,9 @@ if (PHP_DOM == "yes" && PHP_LIBXML == "yes") { notation.c xpath.c dom_iterators.c typeinfo.c domerror.c \ domlocator.c namednodemap.c userdatahandler.c"); AC_DEFINE("HAVE_DOM", 1, "DOM support"); + if (!PHP_DOM_SHARED) { + ADD_FLAG("CFLAGS_DOM", "/D LIBXML_STATIC "); + } } diff --git a/ext/libxml/config.w32 b/ext/libxml/config.w32 index de6e853e16..2edd6aad85 100644 --- a/ext/libxml/config.w32 +++ b/ext/libxml/config.w32 @@ -10,7 +10,8 @@ if (PHP_LIBXML == "yes") { EXTENSION("libxml", "libxml.c", false /* never shared */); AC_DEFINE("HAVE_LIBXML", 1, "LibXML support"); - ADD_FLAG("CFLAGS", "/D LIBXML_THREAD_ENABLED /D LIBXML_STATIC "); + ADD_FLAG("CFLAGS", "/D LIBXML_THREAD_ENABLED"); + ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC "); if (!PHP_LIBXML_SHARED) { ADD_DEF_FILE("ext\\libxml\\php_libxml2.def"); } diff --git a/ext/simplexml/config.w32 b/ext/simplexml/config.w32 index 35a29c02ef..da4a0114cf 100644 --- a/ext/simplexml/config.w32 +++ b/ext/simplexml/config.w32 @@ -6,6 +6,9 @@ ARG_WITH("simplexml", "Simple XML support", "yes"); if (PHP_SIMPLEXML == "yes" && PHP_LIBXML == "yes") { EXTENSION("simplexml", "simplexml.c"); AC_DEFINE("HAVE_SIMPLEXML", 1, "Simple XML support"); + if (!PHP_SIMPLEXML_SHARED) { + ADD_FLAG("CFLAGS_SIMPLEXML", "/D LIBXML_STATIC"); + } } diff --git a/ext/xml/config.w32 b/ext/xml/config.w32 index 29bb5613d4..61a489e543 100644 --- a/ext/xml/config.w32 +++ b/ext/xml/config.w32 @@ -6,6 +6,9 @@ ARG_WITH("xml", "XML support", "yes"); if (PHP_XML == "yes" && PHP_LIBXML == "yes") { EXTENSION("xml", "xml.c compat.c"); AC_DEFINE("HAVE_XML", 1, "XML support"); + if (!PHP_XML_SHARED) { + ADD_FLAG("CFLAGS_XML", "/D LIBXML_STATIC "); + } } diff --git a/ext/xsl/config.w32 b/ext/xsl/config.w32 index e5ad29fc58..252caeb786 100644 --- a/ext/xsl/config.w32 +++ b/ext/xsl/config.w32 @@ -5,13 +5,21 @@ ARG_WITH("xsl", "xsl support", "no"); if (PHP_XSL != "no") { if (PHP_DOM == "yes" && PHP_LIBXML == "yes") { - if (CHECK_LIB("libxslt_a.lib;libxslt.lib", "xsl", PHP_XSL) && - CHECK_HEADER_ADD_INCLUDE("libxslt\\xslt.h", "CFLAGS_XSL")) { + var ext_xsl_lib_found = false; + + if (CHECK_LIB("libxslt_a.lib", "xsl", PHP_XSL)) { + ADD_FLAG("CFLAGS_XSL", "/D LIBXSL_STATIC "); + ext_xsl_lib_found = true; + } else if (CHECK_LIB("libxslt.lib", "xsl", PHP_XSL)) { + ext_xsl_lib_found = true; + } + + if (ext_xsl_lib_found && CHECK_HEADER_ADD_INCLUDE("libxslt\\xslt.h", "CFLAGS_XSL")) { EXTENSION("xsl", "php_xsl.c xsltprocessor.c", PHP_XSL_SHARED); AC_DEFINE("HAVE_XSL", 1, "Define if xsl extension is enabled"); if (! PHP_XSL_SHARED) { - ADD_FLAG("CFLAGS_XSL", "/D DOM_EXPORTS "); + ADD_FLAG("CFLAGS_XSL", "/D DOM_EXPORTS /D LIBXML_STATIC"); } } else { WARNING("xsl not enabled; libraries and headers not found"); -- 2.40.0