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 @@ -140,8 +140,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
140140 set (HAVE_STATFS FALSE )
141141 set (HAVE_STATVFS FALSE )
142142 set (HAVE_STD_SYSLOG FALSE )
143- set (HAVE_STDDEF_H TRUE )
144- set (HAVE_STDINT_H TRUE )
143+ set (HAVE_STDDEF_H TRUE ) # Defined by check_type_size().
144+ set (HAVE_STDINT_H TRUE ) # Defined by check_type_size().
145145 set (HAVE_STRCASESTR FALSE )
146146 set (HAVE_STRINGS_H FALSE )
147147 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 @@ -285,11 +285,6 @@ if(NOT PHP_EXT_GD_EXTERNAL)
285285
286286 set (HAVE_GD_BUNDLED TRUE )
287287
288- # With bundled GD library these are always available.
289- set (HAVE_GD_PNG TRUE )
290- set (HAVE_GD_BMP TRUE )
291- set (HAVE_GD_TGA TRUE )
292-
293288 php_search_libraries(
294289 floorf
295290 HEADERS math.h
@@ -331,6 +326,7 @@ if(NOT PHP_EXT_GD_EXTERNAL)
331326 target_link_libraries (php_ext_gd PRIVATE PNG::PNG)
332327
333328 set (HAVE_LIBPNG TRUE )
329+ set (HAVE_GD_PNG TRUE )
334330
335331 if (PHP_EXT_GD_AVIF)
336332 find_package (libavif 0.8.2)
@@ -473,18 +469,18 @@ else()
473469 (void)p;
474470
475471 return 0;
476- }" ${result} )
477-
472+ }" PHP_EXT_GD_${result} )
478473 cmake_pop_check_state()
474+
475+ set (${result} ${PHP_EXT_GD_${result} })
476+ return (PROPAGATE ${result} )
479477 endfunction ()
480478
481479 php_ext_gd_check_format(Png HAVE_GD_PNG)
482480 php_ext_gd_check_format(Avif HAVE_GD_AVIF)
483481 php_ext_gd_check_format(Webp HAVE_GD_WEBP)
484482 php_ext_gd_check_format(Jpeg HAVE_GD_JPG)
485483 php_ext_gd_check_format(Xpm HAVE_GD_XPM)
486- php_ext_gd_check_format(Bmp HAVE_GD_BMP)
487- php_ext_gd_check_format(Tga HAVE_GD_TGA)
488484
489485 cmake_push_check_state(RESET)
490486 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