sniper          Fri May  4 21:57:47 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/gd     config.m4 
  Log:
  MFH:- Prevent bugs like #41265 being submitted from now on.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.m4?r1=1.154.2.1.2.3&r2=1.154.2.1.2.4&diff_format=u
Index: php-src/ext/gd/config.m4
diff -u php-src/ext/gd/config.m4:1.154.2.1.2.3 
php-src/ext/gd/config.m4:1.154.2.1.2.4
--- php-src/ext/gd/config.m4:1.154.2.1.2.3      Wed Apr  4 00:47:55 2007
+++ php-src/ext/gd/config.m4    Fri May  4 21:57:47 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.154.2.1.2.3 2007/04/04 00:47:55 pajoye Exp $
+dnl $Id: config.m4,v 1.154.2.1.2.4 2007/05/04 21:57:47 sniper Exp $
 dnl
 
 dnl
@@ -211,15 +211,22 @@
       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=<DIR>])
   fi
@@ -440,6 +447,10 @@
     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"

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to