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, 'Have tidybuffio.h header file'); 17 } 18 19 EXTENSION("tidy", "tidy.c"); 20 AC_DEFINE('HAVE_TIDY', 1, 'Have TIDY library'); 21 AC_DEFINE('HAVE_TIDY_H', 1, "tidy include header") 22 AC_DEFINE('HAVE_TIDYOPTGETDOC', 1, "tidy_get_opt_doc function") 23 AC_DEFINE('HAVE_TIDYRELEASEDATE', 1, "tidy release date 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