summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2002-12-14 09:33:37 +0000
committerfoobar <sniper@php.net>2002-12-14 09:33:37 +0000
commitc07f7c8df8f654da07f64496e1712951e3a270a1 (patch)
tree4197818f03fed3a668650f4772a17c04aca9e782
parent43202b5b95cb10f57675a60f26f8997411fc7d21 (diff)
downloadphp-git-c07f7c8df8f654da07f64496e1712951e3a270a1.tar.gz
MFB: Fix bug #20995
-rw-r--r--ext/gd/config.m434
1 files changed, 18 insertions, 16 deletions
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
@@ -243,22 +243,6 @@ AC_DEFUN(PHP_GD_CHECK_VERSION,[
])
dnl
-dnl Check for gd 2.0.4 greater availability
-dnl
-
-AC_TRY_COMPILE(
-[
-#include <gd.h>
-#include <stdlib.h>
-], [
-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 <gd.h>
+#include <stdlib.h>
+ ], [
+gdIOCtx *ctx;
+ctx = malloc(sizeof(gdIOCtx));
+ctx->gd_free = 1;
+ ], [
+ AC_DEFINE(HAVE_LIBGD204, 1, [ ])
+ ])
+ CPPFLAGS=$old_CPPFLAGS
+
fi
fi