php-src/ext/enchant/config.w32
Christoph M. Becker 218c18530a Show actual enchant version if possible
As of libenchant 1.6.0 there is enchant_get_version()[1], so we use it,
if available, to show the actual enchant version in the PHP info.  We
also drop the fake ENCHANT_VERSION_STRING altogether, but stick with
showing version 1.5.x if at least HAVE_ENCHANT_BROKER_SET_PARAM is
defined.

Future scope: we may consider requiring enchant 1.6.0 (or later), since
this has been released in April 2010, and likely is available
everywhere.

[1] <https://www.abisource.com/projects/enchant/>
2019-06-27 13:04:49 +02:00

18 lines
693 B
JavaScript

// vim:ft=javascript
ARG_WITH("enchant", "Enchant Support", "no");
if (PHP_ENCHANT == "yes") {
if (CHECK_HEADER_ADD_INCLUDE("enchant.h", "CFLAGS_ENCHANT", PHP_ENCHANT+ ";" + PHP_PHP_BUILD + "\\include\\enchant") &&
CHECK_HEADER_ADD_INCLUDE("glib.h", "CFLAGS_ENCHANT", PHP_ENCHANT+ ";" + PHP_PHP_BUILD + "\\include\\glib-2.0") &&
CHECK_LIB("libenchant.lib", "enchant", PHP_ENCHANT) ) {
EXTENSION("enchant", "enchant.c");
AC_DEFINE('HAVE_ENCHANT', 1, 'Have Enchant support', false);
AC_DEFINE('HAVE_ENCHANT_GET_VERSION', 1);
AC_DEFINE('HAVE_ENCHANT_BROKER_SET_PARAM', 1);
ADD_FLAG("CFLAG_ENCHANT", "/D _WIN32");
} else {
WARNING('Could not find enchant.h; skipping');
}
}