From: Rob Richards Date: Wed, 9 Jul 2008 16:09:35 +0000 (+0000) Subject: fix zlib detection and linking X-Git-Tag: php-5.3.0alpha1~416 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e83274cd1623ae48247aaaa699c769e7956f6eda;p=php fix zlib detection and linking --- diff --git a/ext/gd/config.w32 b/ext/gd/config.w32 index 6fda13c8d2..f33762de58 100644 --- a/ext/gd/config.w32 +++ b/ext/gd/config.w32 @@ -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) && diff --git a/ext/zip/config.w32 b/ext/zip/config.w32 index b4083ad9a5..c207cd301b 100644 --- a/ext/zip/config.w32 +++ b/ext/zip/config.w32 @@ -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");