From: foobar Date: Sat, 14 Dec 2002 09:32:49 +0000 (+0000) Subject: Fixed bug: #20995 X-Git-Tag: php-4.3.0RC4~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d88973febacd59fe8f52c3db9ccf291196577958;p=php Fixed bug: #20995 --- diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index ba8ca5d0ad..fcbedc73e7 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -242,22 +242,6 @@ AC_DEFUN(PHP_GD_CHECK_VERSION,[ PHP_CHECK_LIBRARY(gd, gdImageGifCtx, [AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) ]) -dnl -dnl Check for gd 2.0.4 greater availability -dnl - -AC_TRY_COMPILE( -[ -#include -#include -], [ -gdIOCtx *ctx; -ctx = malloc(sizeof(gdIOCtx)); -ctx->gd_free = 1; -], [ - AC_DEFINE(HAVE_LIBGD204, 1, [ ]) -]) - dnl dnl Main GD configure dnl @@ -363,6 +347,24 @@ dnl Library path fi PHP_EXPAND_PATH($GD_INCLUDE, GD_INCLUDE) + + dnl + dnl Check for gd 2.0.4 greater availability + dnl + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$GD_INCLUDE + AC_TRY_COMPILE([ +#include +#include + ], [ +gdIOCtx *ctx; +ctx = malloc(sizeof(gdIOCtx)); +ctx->gd_free = 1; + ], [ + AC_DEFINE(HAVE_LIBGD204, 1, [ ]) + ]) + CPPFLAGS=$old_CPPFLAGS + fi fi