File tree Expand file tree Collapse file tree 4 files changed +18
-22
lines changed Expand file tree Collapse file tree 4 files changed +18
-22
lines changed Original file line number Diff line number Diff line change @@ -144,8 +144,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
144144 set (HAVE_STATFS FALSE )
145145 set (HAVE_STATVFS FALSE )
146146 set (HAVE_STD_SYSLOG FALSE )
147- set (HAVE_STDDEF_H TRUE )
148- set (HAVE_STDINT_H TRUE )
147+ set (HAVE_STDDEF_H TRUE ) # Defined by check_type_size().
148+ set (HAVE_STDINT_H TRUE ) # Defined by check_type_size().
149149 set (HAVE_STRCASESTR FALSE )
150150 set (HAVE_STRINGS_H FALSE )
151151 set (HAVE_STRLCAT FALSE )
Original file line number Diff line number Diff line change @@ -66,13 +66,11 @@ set(PHP_SAPI_FPM_PROC_MEM_FILE mem)
6666
6767# Set the exit code for the check whether the external gd library has support
6868# for the given format.
69- set (HAVE_GD_AVIF_EXITCODE 1)
70- set (HAVE_GD_BMP_EXITCODE 1)
71- set (HAVE_GD_JPG_EXITCODE 1)
72- set (HAVE_GD_PNG_EXITCODE 1)
73- set (HAVE_GD_TGA_EXITCODE 1)
74- set (HAVE_GD_WEBP_EXITCODE 1)
75- set (HAVE_GD_XPM_EXITCODE 1)
69+ set (PHP_EXT_GD_HAVE_GD_AVIF_EXITCODE 1)
70+ set (PHP_EXT_GD_HAVE_GD_JPG_EXITCODE 1)
71+ set (PHP_EXT_GD_HAVE_GD_PNG_EXITCODE 1)
72+ set (PHP_EXT_GD_HAVE_GD_WEBP_EXITCODE 1)
73+ set (PHP_EXT_GD_HAVE_GD_XPM_EXITCODE 1)
7674
7775################################################################################
7876# ext/iconv
Original file line number Diff line number Diff line change @@ -288,11 +288,6 @@ if(NOT PHP_EXT_GD_EXTERNAL)
288288
289289 set (HAVE_GD_BUNDLED TRUE )
290290
291- # With bundled GD library these are always available.
292- set (HAVE_GD_PNG TRUE )
293- set (HAVE_GD_BMP TRUE )
294- set (HAVE_GD_TGA TRUE )
295-
296291 target_compile_definitions (
297292 php_ext_gd
298293 PRIVATE
@@ -342,6 +337,7 @@ if(NOT PHP_EXT_GD_EXTERNAL)
342337 target_link_libraries (php_ext_gd PRIVATE PNG::PNG)
343338
344339 set (HAVE_LIBPNG TRUE )
340+ set (HAVE_GD_PNG TRUE )
345341
346342 if (PHP_EXT_GD_AVIF)
347343 find_package (libavif 0.8.2)
@@ -484,18 +480,18 @@ else()
484480 (void)p;
485481
486482 return 0;
487- }" ${result} )
488-
483+ }" PHP_EXT_GD_${result} )
489484 cmake_pop_check_state()
485+
486+ set (${result} ${PHP_EXT_GD_${result} })
487+ return (PROPAGATE ${result} )
490488 endfunction ()
491489
492490 php_ext_gd_check_format(Png HAVE_GD_PNG)
493491 php_ext_gd_check_format(Avif HAVE_GD_AVIF)
494492 php_ext_gd_check_format(Webp HAVE_GD_WEBP)
495493 php_ext_gd_check_format(Jpeg HAVE_GD_JPG)
496494 php_ext_gd_check_format(Xpm HAVE_GD_XPM)
497- php_ext_gd_check_format(Bmp HAVE_GD_BMP)
498- php_ext_gd_check_format(Tga HAVE_GD_TGA)
499495
500496 cmake_push_check_state(RESET)
501497 set (CMAKE_REQUIRED_LIBRARIES GD::GD)
Original file line number Diff line number Diff line change 11/* Define to 1 if gd extension has AVIF support. */
22#cmakedefine HAVE_GD_AVIF 1
33
4- /* Define to 1 if gd extension has BMP support. */
5- #cmakedefine HAVE_GD_BMP 1
4+ /* Define to 1 if gd extension has BMP support (always available and built-in
5+ as of libgd 2.1.0). */
6+ #define HAVE_GD_BMP 1
67
78/* Define to 1 if gd extension uses GD library bundled in PHP. */
89#cmakedefine HAVE_GD_BUNDLED 1
2324/* Define to 1 if gd extension has PNG support. */
2425#cmakedefine HAVE_GD_PNG 1
2526
26- /* Define to 1 if gd extension has TGA support. */
27- #cmakedefine HAVE_GD_TGA 1
27+ /* Define to 1 if gd extension has TGA support (always available and built-in
28+ as of libgd 2.1.0). */
29+ #define HAVE_GD_TGA 1
2830
2931/* Define to 1 if gd extension has WebP support. */
3032#cmakedefine HAVE_GD_WEBP 1
You can’t perform that action at this time.
0 commit comments