From: Edin Kadribasic Date: Mon, 1 Aug 2005 21:57:09 +0000 (+0000) Subject: Allow building gd on windows systems without t1lib (M. Sisolak) #33620 X-Git-Tag: RELEASE_2_0_0~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88fcc4859fab06e2be95ea97226ed2049a7e1c61;p=php Allow building gd on windows systems without t1lib (M. Sisolak) #33620 --- diff --git a/ext/gd/config.w32 b/ext/gd/config.w32 index 434e892894..4b2a5c7a4e 100644 --- a/ext/gd/config.w32 +++ b/ext/gd/config.w32 @@ -2,16 +2,24 @@ // vim:ft=javascript ARG_WITH("gd", "Bundled GD support", "yes,shared"); +ARG_WITH("t1lib", "t1lib support", "yes"); if (PHP_GD != "no") { if (CHECK_LIB("libjpeg.lib", "gd", PHP_GD) && CHECK_LIB("freetype2.lib", "gd", PHP_GD) && CHECK_LIB("libpng.lib", "gd", PHP_GD) && - CHECK_LIB("T1_StaticMD.lib", "gd", PHP_GD) && CHECK_LIB("zlib.lib", "gd", PHP_GD + ";..\\zlib;" + php_usual_lib_suspects) && - CHECK_HEADER_ADD_INCLUDE("gd.h", "CFLAGS_GD", PHP_GD + ";ext\\gd\\libgd") && - CHECK_HEADER_ADD_INCLUDE("t1lib.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\t1lib") + CHECK_HEADER_ADD_INCLUDE("gd.h", "CFLAGS_GD", PHP_GD + ";ext\\gd\\libgd") ) { + if (PHP_T1LIB != "no") { + if (CHECK_LIB("T1_StaticMD.lib", "gd", PHP_GD) && + CHECK_HEADER_ADD_INCLUDE("t1lib.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\t1lib") + ) { + ADD_FLAG("CFLAGS_GD", "/D HAVE_LIBT1"); + } else { + WARNING("t1lib not enabled; libraries and headers not found"); + } + } EXTENSION("gd", "gd.c gdttf.c", null, "-Iext/gd/libgd", "php_gd2.dll"); ADD_SOURCES("ext/gd/libgd", "gd2copypal.c gd_arc_f_buggy.c gd.c \ @@ -43,7 +51,6 @@ if (PHP_GD != "no") { /D HAVE_LIBPNG \ /D USE_GD_IMGSTRTTF \ /D USE_GD_IOCTX \ -/D HAVE_LIBT1 \ /D MSWIN32 \ "); } else { diff --git a/win32/build/confutils.js b/win32/build/confutils.js index b99d7d1a4f..5db1d3fc44 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -// $Id: confutils.js,v 1.58 2005-07-07 13:22:38 wez Exp $ +// $Id: confutils.js,v 1.59 2005-08-01 21:57:09 edink Exp $ var STDOUT = WScript.StdOut; var STDERR = WScript.StdErr; @@ -350,7 +350,7 @@ can be built that way. \ 'php-build', 'snapshot-template', 'pcre-regex', 'fastcgi', 'force-cgi-redirect', 'path-info-check', 'zts', 'ipv6', 'memory-limit', - 'zend-multibyte', 'fd-setsize', 'memory-manager' + 'zend-multibyte', 'fd-setsize', 'memory-manager', 't1lib' ); var force;