1 --- a/ext/gd/config.m4 2018-04-24 11:09:54.000000000 -0400
2 +++ b/ext/gd/config.m4 2018-05-04 15:18:49.867283889 -0400
4 AC_DEFUN([PHP_GD_FREETYPE2],[
5 if test "$PHP_FREETYPE_DIR" != "no"; then
7 - for i in $PHP_FREETYPE_DIR /usr/local /usr; do
8 - if test -f "$i/bin/freetype-config"; then
10 - FREETYPE2_CONFIG="$i/bin/freetype-config"
12 + AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
13 + AC_MSG_CHECKING(for freetype2)
15 + if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
17 + FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
18 + FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
19 + FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
20 + FREETYPE2_DIR="found"
22 + AC_MSG_RESULT(from pkgconfig: version $FREETYPE2_VERSION found)
25 + for i in $PHP_FREETYPE_DIR /usr/local /usr; do
26 + if test -f "$i/bin/freetype-config"; then
28 + FREETYPE2_CONFIG="$i/bin/freetype-config"
33 + if test -z "$FREETYPE2_DIR"; then
34 + AC_MSG_ERROR([freetype-config not found.])
38 - if test -z "$FREETYPE2_DIR"; then
39 - AC_MSG_ERROR([freetype-config not found.])
40 + FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
41 + FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
42 + AC_MSG_RESULT(found via freetype-config)
45 - FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
46 - FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
48 PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
49 PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
50 AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
51 --- a/configure 2018-04-24 11:10:05.000000000 -0400
52 +++ b/configure 2018-05-04 15:18:45.626367913 -0400
53 @@ -34348,21 +34348,79 @@
55 if test "$PHP_FREETYPE_DIR" != "no"; then
57 - for i in $PHP_FREETYPE_DIR /usr/local /usr; do
58 - if test -f "$i/bin/freetype-config"; then
60 - FREETYPE2_CONFIG="$i/bin/freetype-config"
62 + # Extract the first word of "pkg-config", so it can be a program name with args.
63 +set dummy pkg-config; ac_word=$2
64 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65 +$as_echo_n "checking for $ac_word... " >&6; }
66 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
67 + $as_echo_n "(cached) " >&6
71 + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
74 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
78 + test -z "$as_dir" && as_dir=.
79 + for ac_exec_ext in '' $ac_executable_extensions; do
80 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
81 + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
82 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
89 + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
93 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
94 +if test -n "$PKG_CONFIG"; then
95 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
96 +$as_echo "$PKG_CONFIG" >&6; }
98 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
102 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
103 +$as_echo_n "checking for freetype2... " >&6; }
106 + if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
108 + FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
109 + FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
110 + FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
111 + FREETYPE2_DIR="found"
113 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE2_VERSION found" >&5
114 +$as_echo "from pkgconfig: version $FREETYPE2_VERSION found" >&6; }
117 + for i in $PHP_FREETYPE_DIR /usr/local /usr; do
118 + if test -f "$i/bin/freetype-config"; then
120 + FREETYPE2_CONFIG="$i/bin/freetype-config"
125 + if test -z "$FREETYPE2_DIR"; then
126 + as_fn_error $? "freetype-config not found." "$LINENO" 5
130 - if test -z "$FREETYPE2_DIR"; then
131 - as_fn_error $? "freetype-config not found." "$LINENO" 5
132 + FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
133 + FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
134 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
135 +$as_echo "found via freetype-config" >&6; }
138 - FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
139 - FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
142 for ac_i in $FREETYPE2_CFLAGS; do
144 @@ -36019,21 +36076,78 @@
146 if test "$PHP_FREETYPE_DIR" != "no"; then
148 - for i in $PHP_FREETYPE_DIR /usr/local /usr; do
149 - if test -f "$i/bin/freetype-config"; then
151 - FREETYPE2_CONFIG="$i/bin/freetype-config"
153 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
154 +$as_echo_n "checking for freetype2... " >&6; }
155 + # Extract the first word of "pkg-config", so it can be a program name with args.
156 +set dummy pkg-config; ac_word=$2
157 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
158 +$as_echo_n "checking for $ac_word... " >&6; }
159 +if ${ac_cv_path_PKG_CONFIG+:} false; then :
160 + $as_echo_n "(cached) " >&6
162 + case $PKG_CONFIG in
164 + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
167 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
171 + test -z "$as_dir" && as_dir=.
172 + for ac_exec_ext in '' $ac_executable_extensions; do
173 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
174 + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
175 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
182 + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
186 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
187 +if test -n "$PKG_CONFIG"; then
188 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
189 +$as_echo "$PKG_CONFIG" >&6; }
191 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
192 +$as_echo "no" >&6; }
197 + if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
199 + FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
200 + FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
201 + FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
203 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE_VERSON found" >&5
204 +$as_echo "from pkgconfig: version $FREETYPE_VERSON found" >&6; }
207 + for i in $PHP_FREETYPE_DIR /usr/local /usr; do
208 + if test -f "$i/bin/freetype-config"; then
210 + FREETYPE2_CONFIG="$i/bin/freetype-config"
215 + if test -z "$FREETYPE2_DIR"; then
216 + as_fn_error $? "freetype-config not found." "$LINENO" 5
220 - if test -z "$FREETYPE2_DIR"; then
221 - as_fn_error $? "freetype-config not found." "$LINENO" 5
222 + FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
223 + FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
224 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
225 +$as_echo "found via freetype-config" >&6; }
228 - FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
229 - FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
232 for ac_i in $FREETYPE2_CFLAGS; do