pajoye Tue Dec 26 10:42:26 2006 UTC
Modified files:
/php-src/ext/gd config.m4
Log:
- Add better zlib detection
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.m4?r1=1.167&r2=1.168&diff_format=u
Index: php-src/ext/gd/config.m4
diff -u php-src/ext/gd/config.m4:1.167 php-src/ext/gd/config.m4:1.168
--- php-src/ext/gd/config.m4:1.167 Fri Jan 20 21:58:17 2006
+++ php-src/ext/gd/config.m4 Tue Dec 26 10:42:25 2006
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.167 2006/01/20 21:58:17 sniper Exp $
+dnl $Id: config.m4,v 1.168 2006/12/26 10:42:25 pajoye Exp $
dnl
dnl
@@ -44,6 +44,30 @@
dnl Checks for the configure options
dnl
+AC_DEFUN([PHP_GD_ZLIB],[
+ if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
+ if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
+ PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
+ elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
+ PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
+ PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
+ else
+ AC_MSG_ERROR([Can't find zlib headers under
"$PHP_ZLIB_DIR"])
+ fi
+ else
+ for i in /usr/local /usr; do
+ if test -f "$i/include/zlib/zlib.h"; then
+ PHP_ZLIB_DIR="$i"
+ PHP_ZLIB_INCDIR="$i/include/zlib"
+ elif test -f "$i/include/zlib.h"; then
+ PHP_ZLIB_DIR="$i"
+ PHP_ZLIB_INCDIR="$i/include"
+ fi
+ done
+ fi
+])
+
AC_DEFUN([PHP_GD_JPEG],
[
if test "$PHP_JPEG_DIR" != "no"; then
@@ -248,7 +272,7 @@
dnl Depending which libraries were included to PHP configure,
dnl enable the support in bundled GD library
-
+ PHP_GD_ZLIB
PHP_GD_TTSTR
PHP_GD_JISX0208
PHP_GD_JPEG
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php