File size: 1,576 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// vim:ft=javascript

ARG_WITH("dom", "DOM support", "yes");

if (PHP_DOM == "yes") {
	if (PHP_LIBXML == "yes" &&
		ADD_EXTENSION_DEP('dom', 'libxml') &&
		CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS_DOM", PHP_PHP_BUILD + "\\include\\libxml2")
	) {
		EXTENSION("dom", "php_dom.c attr.c document.c infra.c \
			xml_document.c html_document.c xml_serializer.c html5_serializer.c html5_parser.c namespace_compat.c private_data.c \
			domexception.c processinginstruction.c \
			cdatasection.c documentfragment.c domimplementation.c element.c inner_outer_html_mixin.c \
			node.c characterdata.c documenttype.c \
			entity.c nodelist.c html_collection.c text.c comment.c \
			entityreference.c \
			token_list.c \
			notation.c xpath.c dom_iterators.c \
			namednodemap.c xpath_callbacks.c", null, "/I ext/lexbor");

		ADD_EXTENSION_DEP('dom', 'lexbor');

		ADD_SOURCES("ext/dom/parentnode", "tree.c css_selectors.c", "dom");
		ADD_SOURCES("ext/dom/lexbor/selectors-adapted", "selectors.c", "dom");

		AC_DEFINE("HAVE_DOM", 1, "Define to 1 if the PHP extension 'dom' is available.");

		if (!PHP_DOM_SHARED) {
			ADD_FLAG("CFLAGS_DOM", "/D LIBXML_STATIC /D LEXBOR_STATIC ");
		} else {
			if (!CHECK_LIB("libxml2.lib", "dom")) {
				WARNING("dom support can't be enabled, libxml is not found")
			}
		}
		PHP_INSTALL_HEADERS("ext/dom",
			"dom_ce.h " +
			"namespace_compat.h " +
			"xml_common.h " +
			"xpath_callbacks.h " +
			"lexbor/selectors-adapted/selectors.h "
		);
	} else {
		WARNING("dom support can't be enabled, libxml is not enabled")
		PHP_DOM = "no"
	}
}