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

index 6fda13c8d218126798b0a86b5445743b448f5757..f33762de582d4d701046ffd7e1b869f23f2449f2 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) &&
index b4083ad9a58b6c366d9d5e53d296eeae64485a7e..c207cd301b5ab0d6a4cad7daa4c22a7999824219 100644 (file)
@@ -4,10 +4,10 @@
 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  \
@@ -28,7 +28,6 @@ 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);
        } else {
                WARNING("zip not enabled; libraries and headers not found");