Skip to content

Commit f50297b

Browse files
committed
gd patch
1 parent 7a3589c commit f50297b

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

ext/gd/config.m4

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,23 @@ AC_DEFUN([PHP_GD_ZLIB],[
5050
elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
5151
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
5252
PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
53+
elif test -f "$PHP_ZLIB_DIR/develop/headers/zlib.h"; then
54+
PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
55+
PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/develop/headers"
5356
else
5457
AC_MSG_ERROR([Can't find zlib headers under "$PHP_ZLIB_DIR"])
5558
fi
5659
else
57-
for i in /usr/local /usr; do
60+
for i in /usr/local /usr /system; do
5861
if test -f "$i/include/zlib/zlib.h"; then
5962
PHP_ZLIB_DIR="$i"
6063
PHP_ZLIB_INCDIR="$i/include/zlib"
6164
elif test -f "$i/include/zlib.h"; then
6265
PHP_ZLIB_DIR="$i"
6366
PHP_ZLIB_INCDIR="$i/include"
67+
elif test -f "$i/develop/headers/zlib.h"; then
68+
PHP_ZLIB_DIR="$i"
69+
PHP_ZLIB_INCDIR="$i/develop/headers"
6470
fi
6571
done
6672
fi
@@ -71,6 +77,7 @@ AC_DEFUN([PHP_GD_WEBP],[
7177
7278
for i in $PHP_WEBP_DIR /usr/local /usr; do
7379
test -f $i/include/webp/decode.h && GD_WEBP_DIR=$i && break
80+
test -f $i/develop/headers/webp/decode.h && GD_WEBP_DIR=$i && break
7481
done
7582
7683
if test -z "$GD_WEBP_DIR"; then
@@ -79,6 +86,7 @@ AC_DEFUN([PHP_GD_WEBP],[
7986
8087
for i in $PHP_WEBP_DIR /usr/local /usr; do
8188
test -f $i/include/webp/encode.h && GD_WEBP_DIR=$i && break
89+
test -f $i/develop/headers/webp/encode.h && GD_WEBP_DIR=$i && break
8290
done
8391
8492
if test -z "$GD_WEBP_DIR"; then
@@ -103,8 +111,9 @@ AC_DEFUN([PHP_GD_WEBP],[
103111
AC_DEFUN([PHP_GD_JPEG],[
104112
if test "$PHP_JPEG_DIR" != "no"; then
105113
106-
for i in $PHP_JPEG_DIR /usr/local /usr; do
114+
for i in $PHP_JPEG_DIR /usr/local /usr /system; do
107115
test -f $i/include/jpeglib.h && GD_JPEG_DIR=$i && break
116+
test -f $i/develop/headers/jpeglib.h && GD_JPEG_DIR=$i && break
108117
done
109118
110119
if test -z "$GD_JPEG_DIR"; then
@@ -130,6 +139,7 @@ AC_DEFUN([PHP_GD_PNG],[
130139
131140
for i in $PHP_PNG_DIR /usr/local /usr; do
132141
test -f $i/include/png.h && GD_PNG_DIR=$i && break
142+
test -f $i/develop/headers/png.h && GD_PNG_DIR=$i && break
133143
done
134144
135145
if test -z "$GD_PNG_DIR"; then
@@ -162,6 +172,8 @@ AC_DEFUN([PHP_GD_XPM],[
162172
for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
163173
test -f $i/include/xpm.h && GD_XPM_DIR=$i && GD_XPM_INC=$i && break
164174
test -f $i/include/X11/xpm.h && GD_XPM_DIR=$i && GD_XPM_INC=$i/X11 && break
175+
test -f $i/develop/headers/xpm.h && GD_XPM_DIR=$i && GD_XPM_INC=$i && break
176+
test -f $i/develop/headers/X11/xpm.h && GD_XPM_DIR=$i && GD_XPM_INC=$i/X11 && break
165177
done
166178
167179
if test -z "$GD_XPM_DIR"; then
@@ -186,7 +198,7 @@ AC_DEFUN([PHP_GD_XPM],[
186198
AC_DEFUN([PHP_GD_FREETYPE2],[
187199
if test "$PHP_FREETYPE_DIR" != "no"; then
188200
189-
for i in $PHP_FREETYPE_DIR /usr/local /usr; do
201+
for i in $PHP_FREETYPE_DIR /usr/local /usr /system; do
190202
if test -f "$i/bin/freetype-config"; then
191203
FREETYPE2_DIR=$i
192204
FREETYPE2_CONFIG="$i/bin/freetype-config"
@@ -317,7 +329,7 @@ dnl Various checks for GD features
317329
PHP_GD_FREETYPE2
318330

319331
dnl Header path
320-
for i in include/gd include/gd2 include gd ""; do
332+
for i in include/gd include/gd2 include gd develop/headers ""; do
321333
test -f "$PHP_GD/$i/gd.h" && GD_INCLUDE="$PHP_GD/$i"
322334
done
323335

0 commit comments

Comments
 (0)