Skip to content

Commit 5afe41b

Browse files
authored
Update ext/simplexml dependencies (#14446)
This syncs the configure time dependencies for ext/simplexml: - ext/spl was once optional but since being always available, conditional usage was removed - ext/libxml required
1 parent 354b263 commit 5afe41b

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

ext/simplexml/config.m4

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ PHP_ARG_ENABLE([simplexml],
55
[yes])
66

77
if test "$PHP_SIMPLEXML" != "no"; then
8-
9-
if test "$PHP_LIBXML" = "no"; then
10-
AC_MSG_ERROR([SimpleXML extension requires LIBXML extension, add --with-libxml])
11-
fi
12-
138
PHP_SETUP_LIBXML(SIMPLEXML_SHARED_LIBADD, [
149
AC_DEFINE(HAVE_SIMPLEXML,1,[ ])
1510
PHP_NEW_EXTENSION(simplexml, simplexml.c, $ext_shared)
11+
PHP_ADD_EXTENSION_DEP(simplexml, libxml)
12+
PHP_ADD_EXTENSION_DEP(simplexml, spl)
1613
PHP_INSTALL_HEADERS([ext/simplexml], [php_simplexml.h php_simplexml_exports.h])
1714
PHP_SUBST(SIMPLEXML_SHARED_LIBADD)
1815
])
19-
PHP_ADD_EXTENSION_DEP(simplexml, libxml)
20-
PHP_ADD_EXTENSION_DEP(simplexml, spl, true)
2116
fi

ext/simplexml/config.w32

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ARG_WITH("simplexml", "Simple XML support", "yes");
55
if (PHP_SIMPLEXML == "yes") {
66
if(PHP_LIBXML == "yes" &&
77
ADD_EXTENSION_DEP('simplexml', 'libxml') &&
8+
ADD_EXTENSION_DEP('simplexml', 'spl') &&
89
CHECK_HEADER_ADD_INCLUDE("libxml/tree.h", "CFLAGS_SIMPLEXML", PHP_PHP_BUILD + "\\include\\libxml2")
910
) {
1011
EXTENSION("simplexml", "simplexml.c");
@@ -17,9 +18,6 @@ if (PHP_SIMPLEXML == "yes") {
1718
}
1819
}
1920

20-
if (!ADD_EXTENSION_DEP('simplexml', 'spl', true)) {
21-
MESSAGE("\tSPL support in simplexml disabled");
22-
}
2321
ADD_FLAG("CFLAGS_SIMPLEXML", "/D PHP_SIMPLEXML_EXPORTS ");
2422
PHP_INSTALL_HEADERS("ext/simplexml", "php_simplexml.h php_simplexml_exports.h");
2523
} else {

0 commit comments

Comments
 (0)