Skip to content

Commit 1831279

Browse files
committedNov 21, 1999
# Fix ColorResolve bogosity
Fix gd problems
1 parent 64eac40 commit 1831279

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed
 

‎ext/gd/config.m4

+15
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,21 @@ dnl A whole whack of possible places where this might be
9090
],[
9191
AC_CHECK_LIB(gd, gdImageLine)
9292
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
93+
if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
94+
old_LIBS=$LIBS
95+
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
96+
LIBS="$LIBS -lpng -lz"
97+
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1)])
98+
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1)])
99+
100+
LIBS=$old_LIBS
101+
LDFLAGS=$old_LDFLAGS
102+
if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
103+
AC_ADD_LIBRARY(png)
104+
AC_ADD_LIBRARY(z)
105+
fi
106+
ac_cv_lib_gd_gdImageLine=yes
107+
fi
93108
])
94109
if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
95110
CHECK_TTF="yes"

‎ext/gd/gdttf.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ static void bitmapRelease( void *element );
149149
/* local prototype */
150150
char *gdttfchar(gdImage *im, int fg, font_t *font, int x, int y, TT_F26Dot6 x1, TT_F26Dot6 y1, TT_F26Dot6 *advance, TT_BBox **bbox, char **next);
151151

152-
/* This prototype is missing from gd.h */
153-
/* FIXME Since when does GD have this function??? My copy of 1.3 doesnt
152+
#ifndef HAVE_GDIMAGECOLORRESOLVE
153+
154154
int gdImageColorResolve(gdImagePtr im, int r, int g, int b);
155-
*/
156155

157156
/********************************************************************/
158157
/* gdImageColorResolve is a replacement for the old fragment: */
@@ -203,6 +202,7 @@ gdImageColorResolve(gdImagePtr im, int r, int g, int b)
203202
im->open [op] = 0;
204203
return op; /* Return newly allocated color */
205204
}
205+
#endif
206206

207207
/********************************************************************
208208
* gdTcl_UtfToUniChar is borrowed from ...

‎stamp-h.in

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
timestamp

0 commit comments

Comments
 (0)