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 @@ -139,8 +139,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
139139 set (HAVE_STATFS FALSE )
140140 set (HAVE_STATVFS FALSE )
141141 set (HAVE_STD_SYSLOG FALSE )
142- set (HAVE_STDDEF_H TRUE )
143- set (HAVE_STDINT_H TRUE )
142+ set (HAVE_STDDEF_H TRUE ) # Defined by check_type_size().
143+ set (HAVE_STDINT_H TRUE ) # Defined by check_type_size().
144144 set (HAVE_STRCASESTR FALSE )
145145 set (HAVE_STRINGS_H FALSE )
146146 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 @@ -286,11 +286,6 @@ if(NOT PHP_EXT_GD_EXTERNAL)
286286
287287 set (HAVE_GD_BUNDLED TRUE )
288288
289- # With bundled GD library these are always available.
290- set (HAVE_GD_PNG TRUE )
291- set (HAVE_GD_BMP TRUE )
292- set (HAVE_GD_TGA TRUE )
293-
294289 php_search_libraries(
295290 floorf
296291 HEADERS math.h
@@ -332,6 +327,7 @@ if(NOT PHP_EXT_GD_EXTERNAL)
332327 target_link_libraries (php_ext_gd PRIVATE PNG::PNG)
333328
334329 set (HAVE_LIBPNG TRUE )
330+ set (HAVE_GD_PNG TRUE )
335331
336332 if (PHP_EXT_GD_AVIF)
337333 find_package (libavif 0.8.2)
@@ -474,18 +470,18 @@ else()
474470 (void)p;
475471
476472 return 0;
477- }" ${result} )
478-
473+ }" PHP_EXT_GD_${result} )
479474 cmake_pop_check_state()
475+
476+ set (${result} ${PHP_EXT_GD_${result} })
477+ return (PROPAGATE ${result} )
480478 endfunction ()
481479
482480 php_ext_gd_check_format(Png HAVE_GD_PNG)
483481 php_ext_gd_check_format(Avif HAVE_GD_AVIF)
484482 php_ext_gd_check_format(Webp HAVE_GD_WEBP)
485483 php_ext_gd_check_format(Jpeg HAVE_GD_JPG)
486484 php_ext_gd_check_format(Xpm HAVE_GD_XPM)
487- php_ext_gd_check_format(Bmp HAVE_GD_BMP)
488- php_ext_gd_check_format(Tga HAVE_GD_TGA)
489485
490486 cmake_push_check_state(RESET)
491487 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