diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2011-05-12 08:19:37 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2011-05-12 08:19:37 +0000 |
commit | 2954832b97988b60cb1bd621db3146d006baa4ea (patch) | |
tree | 0fc26168660b81d6e80c142fc5037ad4e17e3a0a /ext/gd/config.m4 | |
parent | c2a245f5822ec349955cb689696a1cc326ab7b90 (diff) | |
download | php-git-2954832b97988b60cb1bd621db3146d006baa4ea.tar.gz |
Check headers first and let the CHECK_LIBRARY macro
handle checking for the library. This makes it
correctly handle non-standard system paths as long
as gcc knows about them. Should fix the build on
Ubuntu natty.
Diffstat (limited to 'ext/gd/config.m4')
-rw-r--r-- | ext/gd/config.m4 | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index 34144c4537..ebbdb92fb9 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -72,11 +72,11 @@ AC_DEFUN([PHP_GD_JPEG],[ if test "$PHP_JPEG_DIR" != "no"; then for i in $PHP_JPEG_DIR /usr/local /usr; do - test -f $i/$PHP_LIBDIR/libjpeg.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libjpeg.a && GD_JPEG_DIR=$i && break + test -f $i/include/jpeglib.h && GD_JPEG_DIR=$i && break done if test -z "$GD_JPEG_DIR"; then - AC_MSG_ERROR([libjpeg.(a|so) not found.]) + AC_MSG_ERROR([jpeglib.h not found.]) fi PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, @@ -97,21 +97,17 @@ AC_DEFUN([PHP_GD_PNG],[ if test "$PHP_PNG_DIR" != "no"; then for i in $PHP_PNG_DIR /usr/local /usr; do - test -f $i/$PHP_LIBDIR/libpng.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libpng.a && GD_PNG_DIR=$i && break + test -f $i/include/png.h && GD_PNG_DIR=$i && break done if test -z "$GD_PNG_DIR"; then - AC_MSG_ERROR([libpng.(a|so) not found.]) + AC_MSG_ERROR([png.h not found.]) fi if test "$PHP_ZLIB_DIR" = "no"; then AC_MSG_ERROR([PNG support requires ZLIB. Use --with-zlib-dir=<DIR>]) fi - if test ! -f $GD_PNG_DIR/include/png.h; then - AC_MSG_ERROR([png.h not found.]) - fi - PHP_CHECK_LIBRARY(png,png_write_image, [ PHP_ADD_INCLUDE($GD_PNG_DIR/include) |