cvs: /php4/ext/gd config.h.stub config.m4 gd.c

From: Date: Wed, 24 Nov 1999 21:44:25 +0000
Subject: cvs: /php4/ext/gd config.h.stub config.m4 gd.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-6868@lists.php.net to get a copy of this message
steffann Wed Nov 24 16:44:25 1999 EDT Modified files: /php4/ext/gd config.h.stub config.m4 gd.c Log: Some patched versions of GD support both GIF and PNG. The GD module now checks for both instead of assuming that PNG support means that there is no GIF support anymore. Index: php4/ext/gd/config.h.stub diff -u php4/ext/gd/config.h.stub:1.3 php4/ext/gd/config.h.stub:1.4 --- php4/ext/gd/config.h.stub:1.3 Sun Oct 17 10:57:49 1999 +++ php4/ext/gd/config.h.stub Wed Nov 24 16:43:54 1999 @@ -8,4 +8,7 @@ #undef FREETYPE_4BIT_ANTIALIAS_HACK #undef HAVE_LIBFREETYPE #undef HAVE_LIBTTF + +/* Some versions of GD support both PNG and GIF. Set defines for both. */ #undef HAVE_GD_PNG +#undef HAVE_GD_GIF Index: php4/ext/gd/config.m4 diff -u php4/ext/gd/config.m4:1.17 php4/ext/gd/config.m4:1.18 --- php4/ext/gd/config.m4:1.17 Wed Nov 24 13:50:10 1999 +++ php4/ext/gd/config.m4 Wed Nov 24 16:43:54 1999 @@ -25,7 +25,9 @@ AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ]) LIBS="$LIBS -lpng -lz" AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1)]) +dnl Some versions of GD support both PNG and GIF. Check for both. AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1)]) + AC_CHECK_LIB(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF, 1)]) LIBS=$old_LIBS LDFLAGS=$old_LDFLAGS Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.19 php4/ext/gd/gd.c:1.20 --- php4/ext/gd/gd.c:1.19 Wed Nov 10 13:57:19 1999 +++ php4/ext/gd/gd.c Wed Nov 24 16:43:54 1999 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.19 1999/11/10 18:57:19 rasmus Exp $ */ +/* $Id: gd.c,v 1.20 1999/11/24 21:43:54 steffann Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -101,7 +101,8 @@ #ifdef HAVE_GD_PNG PHP_FE(imagecreatefrompng, NULL) PHP_FE(imagepng, NULL) -#else +#endif +#ifdef HAVE_GD_GIF PHP_FE(imagecreatefromgif, NULL) PHP_FE(imagegif, NULL) #endif @@ -479,7 +480,9 @@ } /* }}} */ -#else +#endif /* HAVE_GD_PNG */ + +#ifdef HAVE_GD_GIF /* {{{ proto int imagecreatefromgif(string filename) Create a new image from file or URL */ @@ -604,7 +607,7 @@ } /* }}} */ -#endif /* HAVE_IMAGECREATEFROMPNG */ +#endif /* HAVE_GD_GIF */ /* {{{ proto int imagedestroy(int im) Destroy an image */

« previous php.version4 (#6868) next »