cvs: /php3 ChangeLog acconfig.h config.h.in configure.in /php3/functions gd.c
| From: | Rasmus Lerdorf | Date: | Wed, 10 Nov 1999 19:54:13 +0000 |
| Subject: | cvs: /php3 ChangeLog acconfig.h config.h.in configure.in /php3/functions gd.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-12263@lists.php.net to get a copy of this message | ||
rasmus Wed Nov 10 14:54:13 1999 EDT
Modified files:
/php3 ChangeLog acconfig.h config.h.in configure.in
/php3/functions gd.c
Log:
Fix gd-1.7.x detection
Index: php3/ChangeLog
diff -u php3/ChangeLog:1.788 php3/ChangeLog:1.789
--- php3/ChangeLog:1.788 Tue Nov 9 08:06:47 1999
+++ php3/ChangeLog Wed Nov 10 14:54:11 1999
@@ -1,7 +1,8 @@
PHP 3.0 CHANGE LOG ChangeLog
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-Nov 6, 1999, Version 3.0.13
+Nov 15, 1999, Version 3.0.13
+- GD-1.7.x detection (Rasmus)
- added patch to functions/mime.c so that form submit with lynx and old IE
works properly (closes bug #2362, code by ash@ash.de)
- tempnam() now uses mkstemp() if available (Stig)
Index: php3/acconfig.h
diff -u php3/acconfig.h:1.114 php3/acconfig.h:1.115
--- php3/acconfig.h:1.114 Sun Oct 24 12:48:02 1999
+++ php3/acconfig.h Wed Nov 10 14:54:11 1999
@@ -91,6 +91,8 @@
/* Define if you have the gd library (-lgd). */
#define HAVE_LIBGD 0
+#undef HAVE_GD_PNG
+
/* Define if you have the GNU gettext library (-lintl). */
#define HAVE_LIBINTL 0
Index: php3/config.h.in
diff -u php3/config.h.in:1.197 php3/config.h.in:1.198
--- php3/config.h.in:1.197 Mon Nov 8 04:09:40 1999
+++ php3/config.h.in Wed Nov 10 14:54:11 1999
@@ -155,6 +155,8 @@
/* Define if you have the gd library (-lgd). */
#define HAVE_LIBGD 0
+#undef HAVE_GD_PNG
+
/* Define if you have the GNU gettext library (-lintl). */
#define HAVE_LIBINTL 0
Index: php3/configure.in
diff -u php3/configure.in:1.471 php3/configure.in:1.472
--- php3/configure.in:1.471 Mon Nov 8 04:09:40 1999
+++ php3/configure.in Wed Nov 10 14:54:11 1999
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.471 1999/11/08 09:09:40 ssb Exp $
+dnl $Id: configure.in,v 1.472 1999/11/10 19:54:11 rasmus Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(main.c)
@@ -767,7 +767,15 @@
AC_DEFINE(HAVE_LIBGD)
AC_MSG_RESULT(yes)
AC_CHECK_LIB(gd, gdImageLzw, [ AC_DEFINE(HAVE_LIBGD_LZW) ])
+ old_LIBS=$LIBS
+ LIBS="$LIBS -lpng -lz"
+ AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG)])
AC_CHECK_LIB(gd, gdImageColorResolve, [ AC_DEFINE(HAVE_LIBGD162) ])
+ LIBS=$old_LIBS
+ if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
+ AC_ADD_LIBRARY(png)
+ AC_ADD_LIBRARY(z)
+ fi
AC_CHECK_LIB(gd, gdImageGif, [], [ AC_DEFINE(HAVE_LIBGD16) ])
AC_CHECK_LIB(gd, gdImageCopyMerge, [ AC_DEFINE(HAVE_LIBGD15) ])
AC_CHECK_LIB(gd, gdImageGifToSink, [ AC_DEFINE(HAVE_LIBGD14) ])
@@ -776,6 +784,7 @@
;;
*)
dnl A whole whack of possible places where this might be
+ test -f $withval/include/gd1.7/gd.h && GD_INCLUDE="$withval/include/gd1.7"
test -f $withval/include/gd1.6/gd.h && GD_INCLUDE="$withval/include/gd1.6"
test -f $withval/include/gd1.5/gd.h && GD_INCLUDE="$withval/include/gd1.5"
test -f $withval/include/gd1.4/gd.h && GD_INCLUDE="$withval/include/gd1.4"
@@ -791,12 +800,14 @@
test -f $withval/lib/libgd.a && GD_LIB="$withval/lib"
test -f $withval/lib/gd/libgd.a && GD_LIB="$withval/lib/gd"
+ test -f $withval/lib/gd1.7/libgd.a && GD_LIB="$withval/lib/gd1.7"
test -f $withval/lib/gd1.6/libgd.a && GD_LIB="$withval/lib/gd1.6"
test -f $withval/lib/gd1.5/libgd.a && GD_LIB="$withval/lib/gd1.5"
test -f $withval/lib/gd1.4/libgd.a && GD_LIB="$withval/lib/gd1.4"
test -f $withval/lib/gd1.3/libgd.a && GD_LIB="$withval/lib/gd1.3"
test -f $withval/libgd.a && GD_LIB="$withval"
test -f $withval/gd/libgd.a && GD_LIB="$withval/gd"
+ test -f $withval/gd1.7/libgd.a && GD_LIB="$withval/gd1.7"
test -f $withval/gd1.6/libgd.a && GD_LIB="$withval/gd1.6"
test -f $withval/gd1.5/libgd.a && GD_LIB="$withval/gd1.5"
test -f $withval/gd1.4/libgd.a && GD_LIB="$withval/gd1.4"
@@ -810,7 +821,15 @@
old_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -L$GD_LIB"
AC_CHECK_LIB(gd, gdImageLzw, [ AC_DEFINE(HAVE_LIBGD_LZW) ])
+ old_LIBS=$LIBS
+ LIBS="$LIBS -lpng -lz"
+ AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG)])
AC_CHECK_LIB(gd, gdImageColorResolve, [ AC_DEFINE(HAVE_LIBGD162) ])
+ LIBS=$old_LIBS
+ if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
+ AC_ADD_LIBRARY(png)
+ AC_ADD_LIBRARY(z)
+ fi
AC_CHECK_LIB(gd, gdImageGif, [], [ AC_DEFINE(HAVE_LIBGD16) ])
AC_CHECK_LIB(gd, gdImageCopyMerge, [ AC_DEFINE(HAVE_LIBGD15) ])
AC_CHECK_LIB(gd, gdImageGifToSink, [ AC_DEFINE(HAVE_LIBGD14) ])
@@ -827,7 +846,15 @@
AC_ADD_LIBRARY(gd)
])
AC_CHECK_LIB(gd, gdImageLzw, [ AC_DEFINE(HAVE_LIBGD_LZW) ])
+ old_LIBS=$LIBS
+ LIBS="$LIBS -lpng -lz"
+ AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG)])
AC_CHECK_LIB(gd, gdImageColorResolve, [ AC_DEFINE(HAVE_LIBGD162) ])
+ LIBS=$old_LIBS
+ if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
+ AC_ADD_LIBRARY(png)
+ AC_ADD_LIBRARY(z)
+ fi
AC_CHECK_LIB(gd, gdImageGif, [], [ AC_DEFINE(HAVE_LIBGD16) ])
AC_CHECK_LIB(gd, gdImageCopyMerge, [ AC_DEFINE(HAVE_LIBGD15) ])
AC_CHECK_LIB(gd, gdImageGifToSink, [ AC_DEFINE(HAVE_LIBGD14) ])
Index: php3/functions/gd.c
diff -u php3/functions/gd.c:1.133 php3/functions/gd.c:1.134
--- php3/functions/gd.c:1.133 Wed Nov 10 13:55:55 1999
+++ php3/functions/gd.c Wed Nov 10 14:54:12 1999
@@ -29,7 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.133 1999/11/10 18:55:55 rasmus Exp $ */
+/* $Id: gd.c,v 1.134 1999/11/10 19:54:12 rasmus Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -128,8 +128,7 @@
{"imagecopy", php3_imagecopy, NULL},
{"imagecopyresized", php3_imagecopyresized, NULL},
{"imagecreate", php3_imagecreate, NULL},
-#if !HAVE_LIBGD16
- /* GIF support is gone from gd-1.6 */
+#if !HAVE_GD_PNG
{"imagecreatefromgif", php3_imagecreatefromgif, NULL},
{"imagegif", php3_imagegif, NULL},
#else
@@ -234,7 +233,7 @@
void php3_info_gd(void) {
/* need to use a PHPAPI function here because it is external module in Windows */
#if HAVE_LIBGD16
- php3_printf("Version 1.6");
+ php3_printf("Version 1.6+");
#elif HAVE_LIBGD15
php3_printf("Version 1.5");
#elif HAVE_LIBGD14
@@ -253,6 +252,9 @@
#if HAVE_LIBT1
php3_printf(" with Type1 font support");
#endif
+#if HAVE_GD_PNG
+ php3_printf(" with PNG support");
+#endif
}
int php3_mend_gd(void){
@@ -445,7 +447,7 @@
}
/* }}} */
-#if !HAVE_LIBGD16
+#if !HAVE_GD_PNG
/* {{{ proto int imagecreatefromgif(string filename)
Create a new image from file or URL */
void php3_imagecreatefromgif (INTERNAL_FUNCTION_PARAMETERS) {
@@ -839,7 +841,7 @@
}
/* }}} */
-#if !HAVE_LIBGD16
+#if !HAVE_GD_PNG
/* {{{ proto int imagegif(int im [, string filename])
Output image to browser or file */
void php3_imagegif (INTERNAL_FUNCTION_PARAMETERS) {