cvs: php4 /ext/gd config.m4
| From: | Jani Taskinen | Date: | Thu, 06 Sep 2001 18:13:52 +0000 |
| Subject: | cvs: php4 /ext/gd config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7252@lists.php.net to get a copy of this message | ||
sniper Thu Sep 6 14:13:52 2001 EDT
Modified files:
/php4/ext/gd config.m4
Log:
Hope this reduces the amount of bogus bug reports when people use wrong paths..
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.73 php4/ext/gd/config.m4:1.74
--- php4/ext/gd/config.m4:1.73 Wed Sep 5 09:18:05 2001
+++ php4/ext/gd/config.m4 Thu Sep 6 14:13:49 2001
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.73 2001/09/05 13:18:05 sniper Exp $
+dnl $Id: config.m4,v 1.74 2001/09/06 18:13:49 sniper Exp $
dnl
AC_DEFUN(PHP_GD_JPEG,[
@@ -12,6 +12,10 @@
test -f "$i/lib/libjpeg.s?" -o -f "$i/lib/libjpeg.a" &&
GD_JPEG_DIR=$i
done
+ if test -z "$GD_JPEG_DIR"; then
+ AC_MSG_ERROR(libjpeg.(a|so) not found.)
+ fi
+
PHP_CHECK_LIBRARY(jpeg,jpeg_read_header,
[
PHP_ADD_LIBRARY_WITH_PATH(jpeg, $GD_JPEG_DIR/lib, GD_SHARED_LIBADD)
@@ -35,6 +39,10 @@
test -f "$i/lib/libpng.s?" -o -f "$i/lib/libpng.a" &&
GD_PNG_DIR=$i
done
+ if test -z "$GD_PNG_DIR"; then
+ AC_MSG_ERROR(libpng.(a|so) not found.)
+ fi
+
if test "$PHP_ZLIB_DIR" = "no"; then
AC_MSG_ERROR(PNG support requires ZLIB. Use --with-zlib-dir=<DIR>)
fi
@@ -59,10 +67,15 @@
[ --with-xpm-dir=DIR GD: Set the path to libXpm install prefix.])
if test "$PHP_XPM_DIR" != "no"; then
+
for i in /usr /usr/local /usr/X11R6 $PHP_XPM_DIR; do
test -f "$i/lib/libXpm.s?" -o -f "$i/lib/libXpm.a" &&
GD_XPM_DIR=$i
done
+ if test -z "$GD_XPM_DIR"; then
+ AC_MSG_ERROR(libXpm.(a|so) not found.)
+ fi
+
PHP_CHECK_LIBRARY(Xpm,XpmFreeXpmImage,
[
PHP_ADD_LIBRARY_WITH_PATH(Xpm, $GD_XPM_DIR/lib, GD_SHARED_LIBADD)
@@ -139,24 +152,25 @@
[ --with-t1lib[=DIR] GD: Include T1lib support.])
if test "$PHP_T1LIB" != "no"; then
+
for i in /usr /usr/local $PHP_T1LIB; do
- test -f "$i/include/t1lib.h" && T1_DIR=$i
+ test -f "$i/include/t1lib.h" && GD_T1_DIR=$i
done
- if test -n "$T1_DIR"; then
- PHP_CHECK_LIBRARY(t1, T1_LoadFont,
- [
- AC_DEFINE(HAVE_LIBT1,1,[ ])
- PHP_ADD_INCLUDE("$T1_DIR/include")
- PHP_ADD_LIBRARY_WITH_PATH(t1, "$T1_DIR/lib", GD_SHARED_LIBADD)
- ],[
- AC_MSG_ERROR(Problem with libt1.(a|so). Please check config.log for more information.)
- ],[
- -L$T1_DIR/lib
- ])
- else
+ if test -z "$GD_T1_DIR"; then
AC_MSG_ERROR(Your t1lib distribution is not installed correctly. Please reinstall it.)
fi
+
+ PHP_CHECK_LIBRARY(t1, T1_LoadFont,
+ [
+ AC_DEFINE(HAVE_LIBT1,1,[ ])
+ PHP_ADD_INCLUDE("$GD_T1_DIR/include")
+ PHP_ADD_LIBRARY_WITH_PATH(t1, "$GD_T1_DIR/lib", GD_SHARED_LIBADD)
+ ],[
+ AC_MSG_ERROR(Problem with libt1.(a|so). Please check config.log for more information.)
+ ],[
+ -L$GD_T1_DIR/lib
+ ])
fi
])
@@ -224,7 +238,7 @@
test -f $PHP_GD/$i/libgd.s? -o -f $PHP_GD/$i/libgd.a && GD_LIB=$PHP_GD/$i
done
- if test -n "$GD_INCLUDE" && test -n "$GD_LIB" ; then
+ if test -n "$GD_INCLUDE" -a -n "$GD_LIB" ; then
PHP_ADD_LIBRARY_WITH_PATH(gd, $GD_LIB, GD_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBGD,1,[ ])
PHP_GD_CHECK_VERSION