summaryrefslogtreecommitdiff
path: root/ext/tidy/config.w32
blob: d12302ac5e0e36d1c3d6f01038b362087c806947 (plain)
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
// vim:ft=javascript

ARG_WITH("tidy", "TIDY support", "no");

if (PHP_TIDY != "no") {
	var tidy_static = false;
	if ((CHECK_LIB("libtidy_a.lib;tidy_a.lib", "tidy", PHP_TIDY) && (tidy_static = true) ||
		CHECK_LIB("libtidy.lib;tidy.lib", "tidy", PHP_TIDY)) &&
			(
				CHECK_HEADER_ADD_INCLUDE("tidy.h", "CFLAGS_TIDY") ||
				CHECK_HEADER_ADD_INCLUDE("tidy/tidy.h", "CFLAGS_TIDY", null, null, true) ||
				CHECK_HEADER_ADD_INCLUDE("libtidy/tidy.h", "CFLAGS_TIDY", null, null, true)
			)) {

		if (CHECK_HEADER_ADD_INCLUDE("tidybuffio.h", "CFLAGS_TIDY")) {
			AC_DEFINE('HAVE_TIDYBUFFIO_H', 1, 'Have tidybuffio.h header file');
		}

		EXTENSION("tidy", "tidy.c");
		AC_DEFINE('HAVE_TIDY', 1, 'Have TIDY library');
		AC_DEFINE('HAVE_TIDY_H', 1, "tidy include header")
		AC_DEFINE('HAVE_TIDYOPTGETDOC', 1, "tidy_get_opt_doc function")
		AC_DEFINE('HAVE_TIDYRELEASEDATE', 1, "tidy release date function")
		ADD_FLAG('CFLAGS_TIDY', '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
		if (!PHP_TIDY_SHARED) {
			ADD_DEF_FILE("ext\\tidy\\php_tidy.def");
		}
		if (tidy_static) {
			ADD_FLAG("CFLAGS_TIDY", "/DTIDY_STATIC=1");
		}

	} else {
		WARNING("tidy not enabled; libraries and headers not found");
	}
}