summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank M. Kromann <fmk@php.net>2004-03-11 18:48:30 +0000
committerFrank M. Kromann <fmk@php.net>2004-03-11 18:48:30 +0000
commit542dc54ce47a3f775c9df46fb7ddc642a6f91e9d (patch)
tree0fb6f088712a3c3feca8bf418020021694345923
parent66b03bdf61fd7a67905f63322224602814e9d735 (diff)
downloadphp-git-542dc54ce47a3f775c9df46fb7ddc642a6f91e9d.tar.gz
Hack to check for ming version 0.2 and 0.3 to inclue the right libs.
-rw-r--r--ext/ming/config.w3234
1 files changed, 31 insertions, 3 deletions
diff --git a/ext/ming/config.w32 b/ext/ming/config.w32
index 8185ffe784..78baa2603d 100644
--- a/ext/ming/config.w32
+++ b/ext/ming/config.w32
@@ -3,10 +3,38 @@
ARG_WITH("ming", "MING support", "no");
-if (PHP_MING != "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;
+ }
- if (CHECK_HEADER_ADD_INCLUDE("ming.h", "CFLAGS_MING", PHP_MING) &&
- CHECK_LIB("libming.lib", "ming", PHP_MING)) {
+ c = file_get_contents(ming_h + "\\ming.h");
+ if (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);
+ 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 {