Skip to content

Commit 0079932

Browse files
orlitzkypetk
authored andcommitted
Fix phpGH-12019: ext/gd/config.m4: don't forget GDLIB_CFLAGS in feature tests
In commit 85e5635, a feature test for the various libgd image formats was added. That test however erroneously omits the GDLIB_CFLAGS (from pkg-config) during compilation. This can lead to build failures and therefore false negatives from the test. Here, we add $GDLIB_CFLAGS to $CFLAGS for the duration of the test. Closes phpGH-12019
1 parent 868257a commit 0079932

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ PHP NEWS
1010
. Add some missing ZPP checks. (nielsdos)
1111
. Fix potential memory leak in XPath evaluation results. (nielsdos)
1212

13+
- GD:
14+
. Fixed bug GH-12019 (add GDLIB_CFLAGS in feature tests). (Michael Orlitzky)
15+
1316
- Gettext:
1417
. Fixed sigabrt raised with dcgettext/dcngettext calls with gettext 0.22.5
1518
with category set to LC_ALL. (David Carlier)

ext/gd/config.m4

+3
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ dnl or run test insufficient.
150150
AC_DEFUN([PHP_GD_CHECK_FORMAT],[
151151
old_LIBS="${LIBS}"
152152
LIBS="${LIBS} ${GD_SHARED_LIBADD}"
153+
old_CFLAGS="${CFLAGS}"
154+
CFLAGS="${CFLAGS} ${GDLIB_CFLAGS}"
153155
AC_MSG_CHECKING([for working gdImageCreateFrom$1 in libgd])
154156
AC_LANG_PUSH([C])
155157
AC_RUN_IFELSE([AC_LANG_SOURCE([
@@ -180,6 +182,7 @@ int main(int argc, char** argv) {
180182
AC_MSG_RESULT([no])
181183
])
182184
AC_LANG_POP([C])
185+
CFLAGS="${old_CFLAGS}"
183186
LIBS="${old_LIBS}"
184187
])
185188

0 commit comments

Comments
 (0)