]> granicus.if.org Git - php/commitdiff
MFB: fix zlib detection and linking
authorRob Richards <rrichards@php.net>
Wed, 9 Jul 2008 16:13:53 +0000 (16:13 +0000)
committerRob Richards <rrichards@php.net>
Wed, 9 Jul 2008 16:13:53 +0000 (16:13 +0000)
- synch zip config.w32

ext/gd/config.w32
ext/zip/config.w32

index caeed872c30a3557915dc9e9be721149d6b8e6a4..34902aeb06b056ffafedd8750673d485b6004677 100644 (file)
@@ -13,7 +13,8 @@ if (PHP_GD != "no") {
                (CHECK_LIB("libiconv_a.lib", "iconv", PHP_ICONV) || CHECK_LIB("libiconv.lib", "iconv", PHP_ICONV) ||
                 CHECK_LIB("iconv_a.lib", "iconv", PHP_ICONV) || CHECK_LIB("iconv.lib", "iconv", PHP_ICONV)) &&
                CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_ICONV", PHP_ICONV) &&
-               ((!PHP_ZLIB_SHARED) && (CHECK_LIB("zlib_a.lib", "gd", PHP_GD) ||  CHECK_LIB("zlib.lib", "gd", PHP_GD)))
+               (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib", "gd", PHP_GD) ||  CHECK_LIB("zlib.lib", "gd", PHP_GD))) || 
+                       (PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "gd", PHP_GD)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
                ) {
                if (PHP_T1LIB != "no") {
                        if (CHECK_LIB("T1_StaticMD.lib", "gd", PHP_GD) &&
@@ -24,6 +25,7 @@ if (PHP_GD != "no") {
                                WARNING("t1lib not enabled; libraries and headers not found");
                        }
                }
+               
                CHECK_LIB("User32.lib", "gd", PHP_GD);
                CHECK_LIB("Gdi32.lib", "gd", PHP_GD);
 
index a8ae4f1223e1fffa71daccbd1ea12b916cce5b04..c207cd301b5ab0d6a4cad7daa4c22a7999824219 100644 (file)
@@ -1,14 +1,13 @@
 // $Id$
 // vim:ft=javascript
 
-ARG_ENABLE("zip", "ZIP support", "no");
+ARG_ENABLE("zip", "ZIP support", "yes");
 
 if (PHP_ZIP != "no") {
-
-       if (CHECK_HEADER_ADD_INCLUDE("zlib.h", "CFLAGS_ZIP", "..\\zlib;" + php_usual_include_suspects + ";" + PHP_ZIP)) {
-               if (PHP_ZLIB_SHARED) {
-                       CHECK_LIB("zlib.lib", "zip", PHP_ZIP);
-               }
+       if (CHECK_HEADER_ADD_INCLUDE("zlib.h", "CFLAGS_ZIP", "..\\zlib;" + PHP_ZIP) &&
+               (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib", "zip", PHP_ZIP) ||  CHECK_LIB("zlib.lib", "zip", PHP_ZIP))) || 
+                       (PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "zip", PHP_ZIP)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
+               ) {
                EXTENSION('zip', 'php_zip.c zip_stream.c');
                ADD_SOURCES(configure_module_dirname + "/lib", "zip_add.c zip_error.c zip_fclose.c \
                      zip_fread.c zip_open.c zip_source_filep.c  \
@@ -29,9 +28,7 @@ if (PHP_ZIP != "no") {
                      zip_unchange_archive.c zip_memdup.c zip_stat_init.c \
                      zip_add_dir.c zip_file_error_clear.c zip_error_clear.c", "zip");
 
-               AC_DEFINE('HAVE_ZLIB', 1);
                AC_DEFINE('HAVE_ZIP', 1);
-               ADD_FLAG("CFLAGS_ZIP", "/D PHP_ZIP_EXPORTS ");
        } else {
                WARNING("zip not enabled; libraries and headers not found");
        }