Skip to content

Commit 3a63538

Browse files
committed
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 GH-12019
1 parent 54ee85b commit 3a63538

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/gd/config.m4

Lines changed: 3 additions & 0 deletions
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)