Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Fix ColorResolve bogosity
Fix gd problems
  • Loading branch information
rlerdorf committed Nov 21, 1999
1 parent 64eac40 commit 1831279
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
15 changes: 15 additions & 0 deletions ext/gd/config.m4
Expand Up @@ -90,6 +90,21 @@ dnl A whole whack of possible places where this might be
],[ ],[
AC_CHECK_LIB(gd, gdImageLine) AC_CHECK_LIB(gd, gdImageLine)
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ]) AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
old_LIBS=$LIBS
AC_CHECK_LIB(gd, gdImageString16, [ AC_DEFINE(HAVE_LIBGD13) ])
LIBS="$LIBS -lpng -lz"
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE,1)])
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1)])
LIBS=$old_LIBS
LDFLAGS=$old_LDFLAGS
if test "$ac_cv_lib_gd_gdImageCreateFromPng" = "yes"; then
AC_ADD_LIBRARY(png)
AC_ADD_LIBRARY(z)
fi
ac_cv_lib_gd_gdImageLine=yes
fi
]) ])
if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
CHECK_TTF="yes" CHECK_TTF="yes"
Expand Down
6 changes: 3 additions & 3 deletions ext/gd/gdttf.c
Expand Up @@ -149,10 +149,9 @@ static void bitmapRelease( void *element );
/* local prototype */ /* local prototype */
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); 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);


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


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


/******************************************************************** /********************************************************************
* gdTcl_UtfToUniChar is borrowed from ... * gdTcl_UtfToUniChar is borrowed from ...
Expand Down
1 change: 1 addition & 0 deletions stamp-h.in
@@ -0,0 +1 @@
timestamp

0 comments on commit 1831279

Please sign in to comment.