xref: /php-src/ext/tidy/config.w32 (revision bf5de048)
1// vim:ft=javascript
2
3ARG_WITH("tidy", "TIDY support", "no");
4
5if (PHP_TIDY != "no") {
6	var tidy_static = false;
7	if ((CHECK_LIB("libtidy_a.lib;tidy_a.lib", "tidy", PHP_TIDY) && (tidy_static = true) ||
8		CHECK_LIB("libtidy.lib;tidy.lib", "tidy", PHP_TIDY)) &&
9			(
10				CHECK_HEADER_ADD_INCLUDE("tidy.h", "CFLAGS_TIDY") ||
11				CHECK_HEADER_ADD_INCLUDE("tidy/tidy.h", "CFLAGS_TIDY", null, null, true) ||
12				CHECK_HEADER_ADD_INCLUDE("libtidy/tidy.h", "CFLAGS_TIDY", null, null, true)
13			)) {
14
15		if (CHECK_HEADER_ADD_INCLUDE("tidybuffio.h", "CFLAGS_TIDY")) {
16			AC_DEFINE('HAVE_TIDYBUFFIO_H', 1, 'Define to 1 if you have the <tidybuffio.h> header file.');
17		}
18
19		EXTENSION("tidy", "tidy.c");
20		AC_DEFINE('HAVE_TIDY', 1, "Define to 1 if the PHP extension 'tidy' is available.");
21		AC_DEFINE('HAVE_TIDY_H', 1, "Define to 1 if you have the <tidy.h> header file.")
22		AC_DEFINE('HAVE_TIDYOPTGETDOC', 1, "Define to 1 if Tidy library has the 'tidyOptGetDoc' function.")
23		AC_DEFINE('HAVE_TIDYRELEASEDATE', 1, "Define to 1 if Tidy library has the 'tidyReleaseDate' function.")
24		ADD_FLAG('CFLAGS_TIDY', '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
25		if (!PHP_TIDY_SHARED) {
26			ADD_DEF_FILE("ext\\tidy\\php_tidy.def");
27		}
28		if (tidy_static) {
29			ADD_FLAG("CFLAGS_TIDY", "/DTIDY_STATIC=1");
30		}
31
32	} else {
33		WARNING("tidy not enabled; libraries and headers not found");
34	}
35}
36