php-src/ext/ming/config.w32
2005-07-18 00:42:48 +00:00

46 lines
1015 B
JavaScript

// $Id$
// vim:ft=javascript
ARG_WITH("ming", "MING support", "no");
// this is a temporary hack
function ming_check_version()
{
var c = null;
var v;
var ming_h = CHECK_HEADER_ADD_INCLUDE("ming.h", "CFLAGS_MING", PHP_MING);
if (!ming_h) {
return false;
}
c = file_get_contents(ming_h + "\\ming.h");
if (typeof(c) == "string" && c.match(/MING_VERSION\s+(0.[a-zA-Z0-9]+)/)) {
v = RegExp.$1;
if (v > "0.2") {
if (CHECK_LIB("libungif.lib", "ming", PHP_MING) &&
CHECK_LIB("libpng.lib", "ming", PHP_MING)) {
AC_DEFINE('HAVE_NEW_MING', 1);
AC_DEFINE('HAVE_SWFPREBUILTCLIP', 1);
if (PHP_ZLIB != "no") {
AC_DEFINE('HAVE_MING_ZLIB', 1);
}
}
}
}
return true;
}
if (PHP_MING != "no") {
if (ming_check_version() && CHECK_LIB("libming.lib", "ming", PHP_MING)) {
if (PHP_ZLIB_SHARED) {
CHECK_LIB("zlib.lib", "ming", PHP_MING);
}
EXTENSION('ming', 'ming.c');
AC_DEFINE('HAVE_MING', 1);
} else {
WARNING("ming not enabled; libraries and headers not found");
}
}