Skip to content

Commit 5ea6b04

Browse files
authored
Autotools: Fix gd extension -I flag for bundled libgd (#15786)
The ext_srcdir variable is at time of writing set only after calling the PHP_NEW_EXTENSION. Other extensions also use @ext_srcdir@ template placeholder for these cases. This fixes wrongly set include flag even though build also works without libgd include flag.
1 parent 4a45742 commit 5ea6b04

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/gd/config.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ dnl Various checks for GD features
279279
PHP_GD_FREETYPE2
280280
PHP_GD_JISX0208
281281

282-
GD_CFLAGS="-Wno-strict-prototypes -I$ext_srcdir/libgd $GD_CFLAGS"
283-
PHP_NEW_EXTENSION([gd], [gd.c $extra_sources], [$ext_shared],, [$GD_CFLAGS])
282+
PHP_NEW_EXTENSION([gd],
283+
[gd.c $extra_sources],
284+
[$ext_shared],,
285+
[-Wno-strict-prototypes -I@ext_srcdir@/libgd])
284286
PHP_ADD_BUILD_DIR([$ext_builddir/libgd])
285287

286288
PHP_INSTALL_HEADERS([ext/gd], [php_gd.h libgd/])

0 commit comments

Comments
 (0)