From 3f6cb452eefcf3c02cdfe951b898a823908be17a Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 4 May 2007 21:57:47 +0000 Subject: [PATCH] MFH:- Prevent bugs like #41265 being submitted from now on. --- ext/gd/config.m4 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index 509d97aeae..0206a8b1cd 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -211,15 +211,22 @@ AC_DEFUN([PHP_GD_FREETYPE2],[ fi done - if test -n "$FREETYPE2_DIR" ; then + if test -z "$FREETYPE2_DIR"; then + AC_MSG_ERROR([freetype.h not found.]) + fi + + PHP_CHECK_LIBRARY(freetype, FT_New_Face, + [ PHP_ADD_LIBRARY_WITH_PATH(freetype, $FREETYPE2_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD) PHP_ADD_INCLUDE($FREETYPE2_DIR/include) PHP_ADD_INCLUDE($FREETYPE2_INC_DIR) AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ]) AC_DEFINE(HAVE_LIBFREETYPE,1,[ ]) - else - AC_MSG_ERROR([freetype2 not found!]) - fi + ],[ + AC_MSG_ERROR([Problem with freetype.(a|so). Please check config.log for more information.]) + ],[ + -L$FREETYPE2_DIR/$PHP_LIBDIR + ]) else AC_MSG_RESULT([If configure fails try --with-freetype-dir=]) fi @@ -440,6 +447,10 @@ if test "$PHP_GD" != "no"; then GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS" PHP_ADD_BUILD_DIR($ext_builddir/libgd) GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/" + + PHP_TEST_BUILD(foobar, [], [ + AC_MSG_ERROR([GD build test failed. Please check the config.log for details.]) + ], [ -L$GD_LIB $GD_SHARED_LIBADD ], [char foobar () {}]) else GD_HEADER_DIRS="ext/gd/" GDLIB_CFLAGS="-I$GD_INCLUDE $GDLIB_CFLAGS" -- 2.50.1