xref: /PHP-7.2/ext/tidy/config.w32 (revision 81207fc6)
1// $Id$
2// vim:ft=javascript
3
4ARG_WITH("tidy", "TIDY support", "no");
5
6if (PHP_TIDY != "no") {
7	var tidy_static = false;
8	if ((CHECK_LIB("libtidy_a.lib;tidy_a.lib", "tidy", PHP_TIDY) && (tidy_static = true) ||
9		CHECK_LIB("libtidy.lib;tidy.lib", "tidy", PHP_TIDY)) &&
10			(
11				CHECK_HEADER_ADD_INCLUDE("tidy.h", "CFLAGS_TIDY") ||
12				CHECK_HEADER_ADD_INCLUDE("tidy/tidy.h", "CFLAGS_TIDY", null, null, true) ||
13				CHECK_HEADER_ADD_INCLUDE("libtidy/tidy.h", "CFLAGS_TIDY", null, null, true)
14			)) {
15
16		if (CHECK_HEADER_ADD_INCLUDE("tidybuffio.h", "CFLAGS_TIDY")) {
17			AC_DEFINE('HAVE_TIDYBUFFIO_H', 1, 'Have tidybuffio.h header file');
18		}
19
20		EXTENSION("tidy", "tidy.c");
21		AC_DEFINE('HAVE_TIDY', 1, 'Have TIDY library');
22		AC_DEFINE('HAVE_TIDYOPTGETDOC', 1, "tidy_get_opt_doc function")
23		ADD_FLAG('CFLAGS_TIDY', '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
24		if (!PHP_TIDY_SHARED) {
25			ADD_DEF_FILE("ext\\tidy\\php_tidy.def");
26		}
27		if (tidy_static) {
28			ADD_FLAG("CFLAGS_TIDY", "/DTIDY_STATIC=1");
29		}
30
31	} else {
32		WARNING("tidy not enabled; libraries and headers not found");
33	}
34}
35