Skip to content

Autotools: Normalize ext/gd sources #15086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 44 additions & 11 deletions ext/gd/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,48 @@ dnl
if test "$PHP_GD" != "no"; then

if test "$PHP_EXTERNAL_GD" = "no"; then
extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \
libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_webp.c libgd/gd_avif.c \
libgd/gd_png.c libgd/gd_jpeg.c libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c \
libgd/gdfontmb.c libgd/gdfontl.c libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c \
libgd/gdcache.c libgd/gdkanji.c libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c \
libgd/gd_topal.c libgd/gd_gif_in.c libgd/gd_xbm.c libgd/gd_gif_out.c libgd/gd_security.c \
libgd/gd_filter.c libgd/gd_pixelate.c libgd/gd_rotate.c libgd/gd_color_match.c \
libgd/gd_transform.c libgd/gd_crop.c libgd/gd_interpolation.c libgd/gd_matrix.c \
libgd/gd_bmp.c libgd/gd_tga.c"
extra_sources=m4_normalize(["
libgd/gd_avif.c
libgd/gd_bmp.c
libgd/gd_color_match.c
libgd/gd_crop.c
libgd/gd_filter.c
libgd/gd_gd.c
libgd/gd_gd2.c
libgd/gd_gif_in.c
libgd/gd_gif_out.c
libgd/gd_interpolation.c
libgd/gd_io_dp.c
libgd/gd_io_file.c
libgd/gd_io_ss.c
libgd/gd_io.c
libgd/gd_jpeg.c
libgd/gd_matrix.c
libgd/gd_pixelate.c
libgd/gd_png.c
libgd/gd_rotate.c
libgd/gd_security.c
libgd/gd_ss.c
libgd/gd_tga.c
libgd/gd_topal.c
libgd/gd_transform.c
libgd/gd_wbmp.c
libgd/gd_webp.c
libgd/gd_xbm.c
libgd/gd.c
libgd/gdcache.c
libgd/gdfontg.c
libgd/gdfontl.c
libgd/gdfontmb.c
libgd/gdfonts.c
libgd/gdfontt.c
libgd/gdft.c
libgd/gdhelpers.c
libgd/gdkanji.c
libgd/gdtables.c
libgd/gdxpm.c
libgd/wbmp.c
"])

dnl These are always available with bundled library
AC_DEFINE(HAVE_GD_BUNDLED, 1, [ ])
Expand All @@ -227,7 +260,7 @@ dnl Various checks for GD features
PHP_GD_JISX0208

GD_CFLAGS="-Wno-strict-prototypes -I$ext_srcdir/libgd $GD_CFLAGS"
PHP_NEW_EXTENSION(gd, gd.c $extra_sources, $ext_shared,, [$GD_CFLAGS])
PHP_NEW_EXTENSION([gd], [gd.c $extra_sources], [$ext_shared],, [$GD_CFLAGS])
PHP_ADD_BUILD_DIR([$ext_builddir/libgd])

PHP_INSTALL_HEADERS([ext/gd], [php_gd.h libgd/])
Expand All @@ -244,7 +277,7 @@ dnl Various checks for GD features
AC_DEFINE(HAVE_LIBGD, 1, [ ])
PHP_GD_CHECK_VERSION

PHP_NEW_EXTENSION(gd, gd.c $extra_sources, $ext_shared)
PHP_NEW_EXTENSION([gd], [gd.c $extra_sources], [$ext_shared])
PHP_INSTALL_HEADERS([ext/gd], [php_gd.h])
PHP_CHECK_LIBRARY(gd, gdImageCreate, [], [
AC_MSG_ERROR([GD build test failed. Please check the config.log for details.])
Expand Down
Loading