]> granicus.if.org Git - php/commitdiff
Allow building gd on windows systems without t1lib (M. Sisolak) #33620
authorEdin Kadribasic <edink@php.net>
Mon, 1 Aug 2005 21:57:09 +0000 (21:57 +0000)
committerEdin Kadribasic <edink@php.net>
Mon, 1 Aug 2005 21:57:09 +0000 (21:57 +0000)
ext/gd/config.w32
win32/build/confutils.js

index 434e89289412f3d30f9b3083ce764b8624b48adb..4b2a5c7a4eea264bf0e6792d1b8f8123b8945090 100644 (file)
@@ -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 {
index b99d7d1a4f812f553c143c810b4b279a97884ace..5db1d3fc443079816e0b94450da059e429bd2ca9 100644 (file)
@@ -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;