Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

# Fix ColorResolve bogosity

Fix gd problems
  • Loading branch information...
commit 1831279f0cbf162c17ec6743074c830917883985 1 parent 64eac40
Rasmus Lerdorf authored November 21, 1999
15  ext/gd/config.m4
@@ -90,6 +90,21 @@ dnl A whole whack of possible places where this might be
90 90
 ],[
91 91
   AC_CHECK_LIB(gd, gdImageLine)
92 92
   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
93 108
 ])
94 109
 if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
95 110
   CHECK_TTF="yes"
6  ext/gd/gdttf.c
@@ -149,10 +149,9 @@ static void bitmapRelease( void *element );
149 149
 /* local prototype */
150 150
 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);
151 151
 
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
+
154 154
 int gdImageColorResolve(gdImagePtr im, int r, int g, int b);
155  
-*/
156 155
 
157 156
 /********************************************************************/
158 157
 /* gdImageColorResolve is a replacement for the old fragment:       */
@@ -203,6 +202,7 @@ gdImageColorResolve(gdImagePtr im, int r, int g, int b)
203 202
 	im->open [op] = 0;
204 203
 	return op;					/* Return newly allocated color */
205 204
 }
  205
+#endif
206 206
 
207 207
 /********************************************************************
208 208
  * gdTcl_UtfToUniChar is borrowed from ...
1  stamp-h.in
... ...
@@ -0,0 +1 @@
  1
+timestamp

0 notes on commit 1831279

Please sign in to comment.
Something went wrong with that request. Please try again.