From: Rob Richards Date: Wed, 9 Jul 2008 16:13:53 +0000 (+0000) Subject: MFB: fix zlib detection and linking X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1326 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b58e7e8c6d1ce118155dc67e9e8944355be941b;p=php MFB: fix zlib detection and linking - synch zip config.w32 --- diff --git a/ext/gd/config.w32 b/ext/gd/config.w32 index caeed872c3..34902aeb06 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) && @@ -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); diff --git a/ext/zip/config.w32 b/ext/zip/config.w32 index a8ae4f1223..c207cd301b 100644 --- a/ext/zip/config.w32 +++ b/ext/zip/config.w32 @@ -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"); }