summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harvey <aharvey@php.net>2013-12-07 19:41:23 -0800
committerAdam Harvey <aharvey@php.net>2013-12-07 19:41:23 -0800
commitd7a45a67be2b82272a908cff54cc4d78a3c6e206 (patch)
tree56bc7b99ba3e6e331b95e93d182fe5d26cc98cad
parentedf601a41f4d8b468883c25f3981d20fd2a9921d (diff)
parenta0955f351c7eb1022da7ae36970ffef3b00c8aff (diff)
downloadphp-git-d7a45a67be2b82272a908cff54cc4d78a3c6e206.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Switch to using freetype-config for freetype detection.
-rw-r--r--NEWS4
-rw-r--r--ext/gd/config.m427
2 files changed, 15 insertions, 16 deletions
diff --git a/NEWS b/NEWS
index 3b3e402b0b..40a8515e9d 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,10 @@ PHP NEWS
- Filter:
. Fixed bug #66229 (128.0.0.0/16 isn't reserved any longer). (Adam)
+- GD:
+ . Fixed bug #64405 (Use freetype-config for determining freetype2 dir(s)).
+ (Adam)
+
- SOAP
. Fixed bug #66112 (Use after free condition in SOAP extension).
(martin dot koegler at brz dot gv dot at)
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index c9e080faab..446c2425ae 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -185,30 +185,25 @@ AC_DEFUN([PHP_GD_FREETYPE2],[
if test "$PHP_FREETYPE_DIR" != "no"; then
for i in $PHP_FREETYPE_DIR /usr/local /usr; do
- if test -f "$i/include/freetype2/freetype/freetype.h"; then
+ if test -f "$i/bin/freetype-config"; then
FREETYPE2_DIR=$i
- FREETYPE2_INC_DIR=$i/include/freetype2
+ FREETYPE2_CONFIG="$i/bin/freetype-config"
break
fi
done
if test -z "$FREETYPE2_DIR"; then
- AC_MSG_ERROR([freetype.h not found.])
+ AC_MSG_ERROR([freetype-config 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,[ ])
- AC_DEFINE(ENABLE_GD_TTF,1,[ ])
- ],[
- AC_MSG_ERROR([Problem with freetype.(a|so). Please check config.log for more information.])
- ],[
- -L$FREETYPE2_DIR/$PHP_LIBDIR
- ])
+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+
+ PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
+ PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
+ AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ])
+ AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
+ AC_DEFINE(ENABLE_GD_TTF,1,[ ])
else
AC_MSG_RESULT([If configure fails try --with-freetype-dir=<DIR>])
fi