-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.w32
69 lines (60 loc) · 2.13 KB
/
config.w32
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// $Id$
// vim:ft=javascript
ARG_WITH("xmldiff", "enable xmldiff support", "no");
if (PHP_XMLDIFF != "no") {
if(PHP_LIBXML != "no" &&
PHP_DOM != "no" &&
CHECK_HEADER_ADD_INCLUDE("xdoc.hh", "CFLAGS_XMLDIFF", PHP_XMLDIFF + ";" + configure_module_dirname + "\\diffmark\\lib") &&
CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "xmldiff") &&
CHECK_LIB("libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib", "xmldiff") &&
CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS_XMLDIFF", PHP_PHP_BUILD + "\\include;" + PHP_PHP_BUILD + "\\include\\libxml2")
) {
EXTENSION("xmldiff", "xmldiff.cpp");
PHP_INSTALL_HEADERS("ext/xmldiff", "php_xmldiff.h");
PHP_INSTALL_HEADERS("ext/xmldiff/diffmark/lib", "diffmark/lib/compare.hh \
diffmark/lib/compareimpl.hh \
diffmark/lib/diff.hh \
diffmark/lib/lcs.hh \
diffmark/lib/lcsimpl.hh \
diffmark/lib/link.hh \
diffmark/lib/merge.hh \
diffmark/lib/namespacecollector.hh \
diffmark/lib/nspace.hh \
diffmark/lib/target.hh \
diffmark/lib/xbuffer.hh \
diffmark/lib/xdoc.hh \
diffmark/lib/xutil.hh");
ADD_SOURCES(configure_module_dirname + "\\diffmark\\lib", " \
compare.cc \
diff.cc \
link.cc \
merge.cc \
namespacecollector.cc \
nspace.cc \
target.cc \
xbuffer.cc \
xdoc.cc \
xutil.cc",
"xmldiff"
);
if (!ADD_EXTENSION_DEP("xmldiff", "dom", true)) {
MESSAGE("\tDOM support in xmldiff disabled");
}
if (!ADD_EXTENSION_DEP("xmldiff", "libxml", true)) {
ERROR("\tlibxml support is required for xmldiff, but couldn't be enabled");
}
AC_DEFINE("HAVE_XMLDIFF", 1, "Have xmldiff extension");
ADD_FLAG("CFLAGS_XMLDIFF", ' /I diffmark/lib /EHsc ');
if (PHP_VERSION < 7) {
ADD_FLAG("CFLAGS_XMLDIFF", ' /D ZEND_WIN32_FORCE_INLINE ');
} else {
ADD_FLAG("CFLAGS_BD_EXT_XMLDIFF", ' /D ZEND_WIN32_KEEP_INLINE=1 /U ZEND_WIN32_FORCE_INLINE ');
}
ADD_FLAG("LDFLAGS_XMLDIFF", ' /libpath:"diffmark/lib" ');
if (!PHP_XMLDIFF_SHARED) {
ADD_FLAG("CFLAGS_XMLDIFF", "/D LIBXML_STATIC");
}
} else {
WARNING("xmldiff not enabled; libraries and headers not found");
}
}